I have some JSON data that I am trying to parse through Javascript and I keep receiving a Cannot read property '0' of undefined error.

This is a short snippet of the data that comes in: "shippingInfo":[{"shippingServiceCost":[{"@currencyId":"USD","__value__":"1.5"}]

As I loop through my JSON results, I use this code to grab the shippingInfo data:

var shipping = parseFloat(items.shippingInfo[0].shippingServiceCost[0].__value__);

However, it appears each time that I receive and error on the shippingServiceCost[0] array, saying its undefined.

Any ideas?