JSFiddle - React, Tailwind, and code Playground
by Paul Leech
HTML
<div id="showIt"></div>
JavaScript
var json = [{
"id" : "1",
"msg" : "hi",
"tid" : "2013-05-05 23:35",
"fromWho": "[email protected]"
},
{
"id" : "2",
"msg" : "there",
"tid" : "2013-05-05 23:45",
"fromWho": "[email protected]"
}];
var showIt = "";
for (var key in json) {
if (json.hasOwnProperty(key)) {
showIt += (json[key].id)+'<br />';
showIt += (json[key].msg)+'<br />';
showIt += '<br />';
}
document.getElementById("showIt").innerHTML = showIt;
}