I don't know where I ma missing something but I have this
var myvar = [{"id":1,"name":"name1"},{"id":2,"name":"name2"}];
and I tried this
$(jQuery.parseJSON(JSON.stringify(myvar))).each(function() {
console.log(this.name);
});
But I have an error in my console : Syntax error, unrecognized expression [{"id":1,"name":"name1"},{"id":2,"name":"name2"]
I am missing something, but I don't know what ?
Edit : in fact when I copy paste the myvar in my console and run the parsing then it works ?? But, when I refresh my page and when I retrieve myvar as so : console.log(myvar), I get [{"id":1,"name":"name1"},{"id":2,"name":"name2"}], without normally told by chrome's console that it is an object
var myvar = [{"id":1,"name":"name1"},{"id":2,"name":"name2"}];name1andname2in the console now. Is the problem solved?