JSFiddle - React, Tailwind, and code Playground
by Brent Coder
HTML
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<div id="information"></div>
JavaScript
(function() {
var json = {
"data": {
"item": [{
"@id": "8",
"fromMemberID": "8",
"FromMember": "david",
"notificationsType": "event",
"notificationsDesc": "A new event (Test Event Thursday, 16 September 2010) has been created.",
"notificationsDate": "16 Sep 2010",
"notificationsTime": "00:02:18"
}, {
"@id": "8",
"fromMemberID": "8",
"FromMember": "Brent",
"notificationsType": "event",
"notificationsDesc": "A new second event (Test Event Thursday, 16 September 2010) has been created.",
"notificationsDate": "16 Sep 2010",
"notificationsTime": "08:26:24"
}]
}
};
$.map(json.data.item, function (m) {
alert(m);
});
//if (json.data.item.length) {
// alert("here");
//$('#information').html(json.data.item[i].FromMember + '<br /> ' + //json.data.item[i].notificationsType + '<br /> ' + //json.data.item[i].notificationsDesc);
// };
});