1st time experimenting with JSON data and I was hoping to get some clarity on my issue.
when is use .getJSON on a local file I get a neat stucture like:
I have no problem getting the value I need (CustRep) with something like:
$.each( data.result, function( key, val ) {
//console.log(val.CustRep);
});
Now if I pull the same data source from a server I get something like this:
I just can't figure out the correct way to go through this structure so I can access the results array I need.
Can anyone please help explain to a JS novice why I am getting different structures on what seems to be the same source and how to properly navigate the 2nd structure so I can get the values for each CustRep?
Thanks!