JSON access

by Joe Saad

HTML

<div id="refs"></div>

JavaScript

var data = [{"UserID":"1234","Reference":"John-1-12","Notes":"We are given the right to become the children of God. Those who believed in Him. ","TimeMod":"2014-03-26 19:15:40"},{"UserID":"1234","Reference":"John-1-1","Notes":"Jesus is Lord of all. ","TimeMod":"2014-03-26 19:08:11"},{"UserID":"1234","Reference":"John-1-6","Notes":"Referring to John the Baptist. Introduction to the life of John the Baptist. ","TimeMod":"2014-03-27 13:00:15"},{"UserID":"1234","Reference":"John-1-43","Notes":"Jesus asked Philip to follow him. Philip did, right away. ","TimeMod":"2014-03-27 14:14:56"},{"UserID":"1234","Reference":"John-1-39","Notes":"Come and you will see. ","TimeMod":"2014-03-27 14:18:46"}];

//var json = JSON.parse(data);
alert(data.length);

for (i=0; i<=5; i++ ){
    $('#refs').append(data[i]["Reference"]+"<br />");
}