Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript get object in object

data = {"id":1,
        "name":"abc",
        "address": {"streetName":"cde",
                    "streetId":2
                    }
        }

data.address.streetName; //Retrieves "cde"
//or
data["address"]["streetName"]
 
PREVIOUS NEXT
Tagged: #javascript #object #object
ADD COMMENT
Topic
Name
2+6 =