Situation
I have a JSON object which is returned. And Below is an example of one. The who
in this particular example can change to what
If you always expect these objects to have only one property, you could do something like this:
var name, person;
for (person in data) {
for (name in data[person]) {
console.log(data[person][name]);
}
}
This would enumerate through each property of each person in the data. Because there is only one property per person (I assume), it will just enumerate that one property and stop, allowing you to use that property regardless of its name.