What do I use in the Template to output the raw JSON to a file. Specifically I want something like this ...
{"ads": [$ads.format('{"link": "$link", "title": "$anchor", "text": "$snippet"},')], "organic": [$serp.format('"$link",')]}
but this is not valid JSON as it has trailing commas in the arrays. How do I return the array without using .format? Or I would be okay with just the raw JSON dump too.
{"ads": [$ads.format('{"link": "$link", "title": "$anchor", "text": "$snippet"},')], "organic": [$serp.format('"$link",')]}
but this is not valid JSON as it has trailing commas in the arrays. How do I return the array without using .format? Or I would be okay with just the raw JSON dump too.