For this JSON dictionary,
{
"user":null,
"currency":"EUR",
"balance":0,
"tranlist": [
{ "date":"323","address":"a"},
{ "date":"121","address":"s"},
]
}
When I use this function, I have problem with getting the Transactions List
$(document.body).append($(
'<table>' + $.map(data, function(value,key){
return '<tr><td>'+key+'</td><td>'+value+'</td></tr>'
}).join('')+'</table>'
));
And here is output:
currency EUR
balance 0
transactions [object Object],[object Object],[object Object],[object Object]
How can I fix my code?
The code you show (that I wrote in a previous answer) was intended for a fast preview of your structure and as an example of object browsing.
Now you must make some code more specific to your problem. For example :
Demonstration
You could also devise a generic and recursive toString function but apart debugging (and
console.logis better for that), there isn’t much point.