javascript - Iterating over a 2D array -
here json object:
{ "status": "ok", "user": { "auth_token": "xxxxxx", "name": "john dot", "pictures":["http://xxxxx.com/me/picture"], "nickname":"tg", "yob": "1986", } } var pjson = json.stringify(this.responsetext); pjson = json.parse(pjson);
i interested in getting keys , values in user object. tried each loop:
for (var key in pjson.user) { console.log('here'); console.log(key); }
didn't work. not sure why, idea why - cheers.
Comments
Post a Comment