Jquery: Object JSON Parse

by Alberto Naperi Jr.

JavaScript

$(document).ready(function() {

    var json = '{"Item 1":[9,{"Item 1.1":19,"Item 1.2":29,"Item 1.3":39}],"Item 2":49,"Item 3":[59,{"Item 3.1":69,"Item 3.2":79,"Item 3.3":89}]}';

    var obj = JSON.parse(json);
    console.log(obj);  

//    $.each(obj, function(key, value) {
//        console.log("iteration start");
//        console.log(key, value);
//        console.log("iteration end");
//        var items = [];
//        items.push('<li class="item">');
//        items.push('<a data-page="' + n + '">' + key + '</a>');
//        items.push('</li>');
//    });

});