I searched but couldnt find the answer to this; I assume its pretty easy but I cant get it right. Trying to get the value of amount here:
let fruit = [
{"prices":{"price":{"amount":4.97,"unit":"ea","quantity":1},"wasPrice":null}
]
I have loop and I tried something like this; but didnt work:
keyPrice = Object.keys(fruit[i].prices.price);
console.log(keyPrice['amount'])
//this is giving me undefined result