parseJSON and Expression Engine
Published under ExpressionEngine, Javascript, jQuery
Start by creating a template which outputs a string of the format:
{
"variable":value",
"variable":"value",
"variable":"value"
}
The squiggly brackets have to be on different lines to stop Expression Engine parsing the contents. Then receive it like so:
$.get("http://cliveportman.co.uk/json-template/", function($data) {
$obj = $.parseJSON($data);
//console.log($obj);
});