I’m just learning jason and nothings working. I’m trying to creat a object with 3 arrays. I tried top do it 2 ways
this.serverReply={
parent:
{comments: [“ted”,”pop”]},
{links:[“link1″,”link2”]},
{Dates:[“link1″,”link2”]}
};
and
this.serverReply={
{comments: ["ted","pop"]},
{links:["link1","link2"]},
{Dates:["link1","link2"]}
};
I get a syntex error saying invalid propery. I cannot figure out why,
Ted
Every property of an object needs to have a name, which is specified like this:
Arrays are specified with square brackets, and do not have named elements:
From that point on, it depends on what you want to do. In both your examples you try to specify object properties without giving them names. Try this instead: