set_url
不會出現在那裏的結果對象,至少不是第一個結果:
{
"editions": [
{
"store_url": "http://store.tcgplayer.com/magic/odyssey/ashen-firebeast?partner=DECKBREW",
"set_url": "https://api.deckbrew.com/mtg/sets/ODY",
"image_url": "https://image.deckbrew.com/mtg/multiverseid/29965.jpg",
"url": "https://api.deckbrew.com/mtg/cards?multiverseid=29965",
"price": {
"note": "store.tcgplayer.com allows you to buy cards from any of our vendors, all at the same time, in a simple checkout experience. Shop, Compare & Save with TCGplayer.com!",
"high": 103,
"median": 32,
"low": 14
},
"set": "Odyssey",
"set_id": "ODY",
"rarity": "rare",
"artist": "Mark Tedin",
"multiverse_id": 29965,
"flavor": "\"I'm not sure which impresses me most, its thoroughness or its intensity.\"\n\n—Matoc, lavamancer",
"number": "174",
"layout": "normal"
}
],
"formats": {
"vintage": "legal",
"legacy": "legal",
"commander": "legal"
},
"toughness": "6",
"power": "6",
"text": "{1}{R}: Ashen Firebeast deals 1 damage to each creature without flying.",
"cost": "{6}{R}{R}",
"name": "Ashen Firebeast",
"id": "ashen-firebeast",
"url": "https://api.deckbrew.com/mtg/cards/ashen-firebeast",
"store_url": "http://store.tcgplayer.com/magic/odyssey/ashen-firebeast?partner=DECKBREW",
"types": [
"creature"
],
"subtypes": [
"beast",
"elemental"
],
"colors": [
"red"
],
"cmc": 8
}
也許你從意味着store_url
,也許set_url
editions
的數組中的對象?
UPDATE:
要使用set_url
的editions
陣列內,只需迭代它像以前一樣:
裏面的第一個$.each
,把這個:
$.each(field.editions, function (index, edition) {
// do something with edition.set_url
});
如果你打印出'editions'的第一個索引... field.editions [0] .set_url',會發生什麼? – entiendoNull
我想你可能已經回答了這個問題,謝謝。 – Patrick2Go