我想从我的localhost解析Json Feed
http://localhost/hardfeed.json 这个Json文件内容是::
{
"bpi": {
"2018-04-14": 8003.6813,
"2018-04-15": 8357.0375,
"2018-04-16": 8051.345,
"2018-04-17": 7890.15,
"2018-04-18": 8163.69,
"2018-04-19": 8273.7413,
"2018-04-20": 8863.5025,
"2018-04-21": 8917.5963,
"2018-04-22": 8792.83,
"2018-04-23": 8938.3038,
"2018-04-24": 9652.1563,
"2018-04-25": 8864.0875,
"2018-04-26": 9278.9975,
"2018-04-27": 8978.3325,
"2018-04-28": 9342.4713,
"2018-04-29": 9392.0313,
"2018-04-30": 9244.3225,
"2018-05-01": 9067.715,
"2018-05-02": 9219.8638,
"2018-05-03": 9734.675,
"2018-05-04": 9692.7175,
"2018-05-05": 9826.5975,
"2018-05-06": 9619.1438,
"2018-05-07": 9362.5338,
"2018-05-08": 9180.1588,
"2018-05-09": 9306,
"2018-05-10": 9014.615,
"2018-05-11": 8406.175,
"2018-05-12": 8467.6563,
"2018-05-13": 8688.0288,
"2018-05-14": 8675.2063
},
"disclaimer": "This Test is generated from Localhost",
"time": {
"updated": "May 15, 2018 00:03:00 UTC",
"updatedISO": "2018-05-15T00:03:00+00:00"
}
}
这是我的JS方法
$.getJSON('http://localhost/hardfeed.json', function(data) {
console.log(data) ;
});