How to access items in a nested JSON object?
How to access items in a nested JSON object?
611
11-May-2023
Updated on 12-May-2023
Aryan Kumar
12-May-2023Accessing items in a nested JSON object can be done by chaining property or index notation to traverse through each level of the object.
Here's an example of a nested JSON object:
To access the `state` property in the `address` object, you can chain the dot notation like this:
To access the second phone number's `number` property, you can use the index notation like this:
By using these techniques, you can access any property or value in a nested JSON object.