jquery iterate through nested object -
i´m getting data php. parse json
var d = $.parsejson(returndata);
d.designer looks like:
[object, object, object] 0: object _id: 1 family: null firstname: "xx" lastname: "yy" __proto__: object 1: object _id: 2 family: null firstname: "xx" lastname: "yy" __proto__: object 2: object _id: 5 family: null firstname: "xx" lastname: "yy" __proto__: object
with jquery how can loop trough objects get:
id: 1 id: 2 id: 5
where id value key _id ?
you can use each return value , key every element
$.each(d, function( index, value ) { console.log("id: "+index); });
Comments
Post a Comment