How to iterate through the Json object?
var obj = { "field": {"row1" : {"col1":10,"col2":20,"col3":30},"row2" : {"col1":20,"col2":30,"col3":40}}}
$(obj).each(function(i,val) {
child_obj =val
while(children = child_obj.children() ) {
child_obj = children .children()
}
});
When I call children function on JSON object it does not get the children.
Will children function work only on DOM elements not on JSON?
How to loop through the JSON object and get the column values?