给定 JSON 包含:
[
{"myKey":"A","status":0,"score":1.5},{"myKey":"C","status":1,"score":2},
{"myKey":"D","status":0,"score":0.2},{"myKey":"E","status":1,"score":16},
{"myKey":"F","status":0,"score":0.4},{"myKey":"G","status":1,"score":3}
]
给定JS这样的:
MyJSON = $.getJSON('http://d.codio.com/hugolpz/getJson--/App/data/statusStarter2.json' );
如何将 JSON 的内容(字符串化)放入 localStorage.data ?
注意: localStorage.data = JSON.stringify(MyJSON);
returns {"readyState":1}
,这不是我的愿望。我查看了jQuery.getJSON/,但我对function (data)
.