Jump to content

referencing json members


nemobluesix

Recommended Posts

thanks for your reply,I did try with "this" but this.x+1 treats "this.x" as object, id does not give me the value "1"paste this in your browsers address bar

java script:var myObj={ "x":1, "y":this.x+1 }; alert(myObj.y);//result: [object NodeList]1

it does not trow an error but it doesn't return what it should either. I don't need this for the moment but it would be nice to know :)

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...