Hi all I'm new to json and I am trying to get the price of gold 3rd level contents->MyFeed->XAUCAD->bid H get this feed from php proxy can someone help be in how to get the gold price
$(document).ready(function () {
$.getJSON("http://feed.php",
function (data) {
alert(data.gold);
});
});
JSON
{
"headers": {
"Cache-Control": "private",
"Content-Type": "application/json; charset=utf-8",
"Server": "Microsoft-IIS/7.0",
"X-AspNet-Version": "4.0.30319",
"X-Powered-By": "ASP.NET",
"X-Served-By": "",
"Date": "Wed, 22 Jan 2014 06:35:06 GMT",
"Content-Length": "200"
},
"status": {},
"contents": {
"MyFeed": {
"@Provider": "FastMarkets",
"XAUCAD": {
"@name": "Gold Canadian $",
"bid_time": "20140122063506",
"bid": "1360.44"
},
"XAGCAD": {
"@name": "Silver Canadian $",
"bid_time": "20140122063507",
"bid": "21.76"
}
}
}
}