JSFiddle - React, Tailwind, and code Playground
by Paul Leech
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 showArray = "";
for (var key in json) {
if (json.hasOwnProperty(key)) {
/*
$showArray .= "<tr><td>$i</td><td>". $value["variable"] . "</td><td style=\"background:" . $value["value"] . "\">" . $value["value"] . "</td><td>". $value["example"] . "</td></tr>";
*/
showArray(json[key].id);
(json[key].msg);
}
}