I have this string:
[
{id:001,
name:Charlie},
{id:002,
name:Ellie},
]
Them, I save this string in a variable and I parse it:
function parseJSON(string){
var mylovelyJSON = JSON.stringify(string);
alert(mylovelyJSON[id]);
}
When I make my alert, I get and undefined, I also tried with mylovelyJSON.id, And I get the same.
Could not be a Json? I get this string from an php array.