Rene Rene - 1 year ago 111
Javascript Question

Get Json object or loop

I have the following json.


I need to get the values of the sockets, already tried with loop and several other ways more can not. Can someone help me?

Already I tried so

$.each(json, function(idx, obj) {

Answer Source
var obj= {"sockets":{"16":true},"length":1}

$.each( obj, function( key, value ) {
  alert(JSON.stringify(key) + ": " + JSON.stringify(value) );


Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download