I have an object and a for in loop that looks like this:
var golom = {
MRTU03: {
Temp: "10",
Sp: "11"
},
MRTU09: {
Temp: "8",
Sp: "7"
}
};
for (var f in golom) {
$('body').append('hi ' + golom[f]);
}
As it is it's printing:
hi [object Object]hi [object Object]
to the body
, but how can I get it to print
hi MRTU03hi MRTU09
??
Thanks!
No comments:
Post a Comment