Parse JSON data | jQuery Tips and Tricks

http://jquerytipsntricks.wordpress.com/2013/07/06/parse-json-data-using-jquery-getjson/

by Alex Azuero

JavaScript

var json = {
    "0": {
        "ad": "123",
        "type": "xxx",
        "title": "title1"
    },
    "a": {
        "ad": "123",
        "type": "abc",
        "title": "title1"
    }
}

var type1 = json['0'].type;
var type2 = json['a'].type;
alert(type1);    // Type :  xxx
alert('Type : ', type2);    // Type :  abc