I want to parse json to js object with data. this is my simple example :
var IsTrue = true;
var Number = 9;
var Object = { a : 1};
var Array = [10,6];
var jStr = '{"ask" : IsTrue, "value" : Number, "obj" : Object, "arr" : Array}';
var js = JSON.parse(jStr);
console.log(js);
I work in this jsfiddle : http://jsfiddle.net/n4tLgp5k/1/
I get error :
Uncaught SyntaxError: Unexpected token I
i wish i can parse json to js object and variable in object initialized value with initialized variable before.