からオブジェクトを作成します。は、私はこの質問に異なる答えをたくさん見てきたし、私のプロジェクトに自分のコードを適用しようとしているが、これらのソリューションのどれも私が持っているデータのために働くように見えるんJSON
[{ "生き物":{ "ID":1、 "名前": "RIP"、 "sprite_location":ヌル、 "health_points":0
私はいくつかのオブジェクトにこの出力を有効にする必要があり0 "、" action_points ":0、" attack_cost ":0}}、{" creature ":{" id ":2、" name ":" RIP "、" sprite_location " : "http://chunkofwhat.com/games/Parousia/sprites/rip.gif"、 "health_points":0、 "attack":0、 "defense":0、 "action_points":0、 "attack_cost":0 }}、{"creature":{"id":3、 "name": "Bull。"、 "sprite_location": "http://chunkofwhat.com/games/Parousia/sprites/bull.gif"、 "health_points "、"攻撃 ":8、"防御 ":20、" action_points ":9、" attack_cost ":5}}、{" creature ":{" id ":4、" name ":" Swallow " 、 "health_points":30、 "attack":12、 "defense":10、 "action_points":13、 "spy_location": "http://chunkofwhat.com/games/Parousia/sprites/swallow.gif" attack_cost ":5 }}、{"creature":{"id":5、 "name": "Kappa"、 "sprite_location": "http://chunkofwhat.com/games/Parousia/sprites/kappa.gif"、 "health_points ":40、" attack ":6、" defense ":15、" action_points ":9、" attack_cost ":3}}、{" creature ":{" id ":6、" name ":null、" sprite_location "null"、 "health_points":null、 "attack":null、 "防御":null、 "action_points":null、 "attack_cost":null}}]
jQuery.parseJSON()を試すと、ちょうど私の[オブジェクトのオブジェクト] Sの束を与えるが、私は生き物を参照することはできません[1] .IDなど
繰り返しますが、私が知っている、これは頻繁に質問をしています。私は実際に多くの他の例を経てきましたが、彼らは私のためにうまくいっていませんでした。
ありがとうございます。