How do I get to, Value, Editions, Price, Average?
My non working code:
.append(th.clone().text(value.editions[0].price[1].average))
The JSON layout:
{
"name": "About Face",
"id": "about-face",
"url": "https://api.deckbrew.com/mtg/cards/about-face",
"store_url": "http://store.tcgplayer.com/magic/urzas-legacy/about-face",
"types": [
"instant"
],
"colors": [
"red"
],
"cmc": 1,
"cost": "{R}",
"text": "Switch target creature's power and toughness until end of turn.",
"formats": {
"commander": "legal",
"legacy": "legal",
"vintage": "legal"
},
"editions": [
{
"set": "Urza's Legacy",
"price": {
"low": 89,
"average": 154,
"high": 198
},
"url": "https://api.deckbrew.com/mtg/cards?multiverseid=12414",
}
]
}
My Fiddle can be found here:
value.editions[0].price.average- price is an object not an array so there is no need to use an index based access