I have a JSON object that has a JSON object inside of it. It looks as follows:
{
"skuInformation": {
"hidden": "No",
"description": "Glass Zipper Bags",
"velocityClass": "Fast Mover",
"currentCatalog": "Yes",
"discontinued": "No",
"sku": "1861900"
}
}
I need the access to the individual information inside of this object through JavaScript, but I'm having trouble trying to access it.
I have a function that parses this JSON object and is returned as jsonResponse. Let's say I needed sku description. I've tried console.log with jsonResponse.description, jsonResponse[0].description, and Object.keys(jsonResponse)[0].description. None of those work, all returning undefined. How do I gain access to the key-values inside of the JSON object?
jsonResponse.skuInformation.descriptionconsole.log(jsonResponse);)[{"foo": "bar", "boo": 1, "far": {"nested": 3}}]