There is a json data:
var json = {
"entry" : [{
"category" : {
"@scheme" : "http:\/\/www.douban.com\/2007#kind",
"@term" : "http:\/\/www.douban.com\/2007#movie"
},
"title" : {
"$t" : "Real Steel"
},
"db:attribute" : [{
"$t" : "USA",
"@name" : "country"
}]
}]
}
alert(json.entry[0].title.$t) can print “Real Steel”. However,
how to get the http:\/\/www.douban.com\/2007#kind and USA in Javascript ?
It contains @ and :, I don’t know how to cope with it.
Use square brackets and a string instead of
.