I am very new to jQuery, and am trying to figure out how to put nested JSON Objects into an array. Here is the JSON data:
{
"0": {
"country": "US",
"itemId": "391296746967",
"price": "4.99",
"shippingCost": {
"expeditedShipping": "false",
"handlingTime": "1",
"oneDayShippingAvailable": "false",
"shipToLocations": "Worldwide",
"shippingServiceCost": {
"_currencyId": "USD",
"value": "0.0"
},
"shippingType": "Free"
},
"title": "Tea Infuser Ball Mesh Loose Leaf Herb Strainer Stainless Steel Secure Locking 2\"",
"user_args": {
"advanced": null,
"pages": {
"entries_per_page": 4,
"page_number": 4
},
"search_terms": "ball"
}
},
"1": {
"country": "US",
"itemId": "382548457911",
"price": "18.9",
"shippingCost": {
"expeditedShipping": "true",
"handlingTime": "1",
"oneDayShippingAvailable": "false",
"shipToLocations": "Worldwide",
"shippingServiceCost": {
"_currencyId": "USD",
"value": "0.0"
},
"shippingType": "Free"
},
"title": "Baby Kid Outdoor Indoor Princess Play Tent Playhouse Ball Pit Pool Toddler Toys",
"user_args": {
"advanced": null,
"pages": {
"entries_per_page": 4,
"page_number": 4
},
"search_terms": "ball"
}
},
"2": {
"country": "US",
"itemId": "132543955826",
"price": "13.99",
"shippingCost": {
"expeditedShipping": "false",
"handlingTime": "1",
"oneDayShippingAvailable": "false",
"shipToLocations": "Worldwide",
"shippingServiceCost": {
"_currencyId": "USD",
"value": "0.0"
},
"shippingType": "Free"
},
"title": "Yoga Ball w Air Pump Anti Burst Exercise Balance Workout Stability 55 65 75 85cm",
"user_args": {
"advanced": null,
"pages": {
"entries_per_page": 4,
"page_number": 4
},
"search_terms": "ball"
}
},
"3": {
"country": "US",
"itemId": "173659697373",
"price": "155.0",
"shippingCost": {
"expeditedShipping": "false",
"handlingTime": "0",
"oneDayShippingAvailable": "false",
"shipToLocations": "Worldwide",
"shippingServiceCost": {
"_currencyId": "USD",
"value": "0.0"
},
"shippingType": "Free"
},
"title": "DribbleUp Smart Soccer Ball with Training App Size 5 For Adults (***Buy ME***)",
"user_args": {
"advanced": null,
"pages": {
"entries_per_page": 4,
"page_number": 4
},
"search_terms": "ball"
}
}
}
From this JSON I need the price
, the shippingCost.value
, the shippingType
, and the title
. I have searched for ways to do this, but all I find is information about the $.getJSON() method, and I can't figure out how to use that to achieve my goal. If anyone could point me in the right direction, it would be greatly appreciated!