I’m working with some JSON objects about homes. The JSON looks like the below. How would I use Javascript parsing to pull out the “yearBuilt” value? It’s part of the building array, which is part of the parcel array.
I’ve explored looping based on other similar asked-questions, but can’t arrive at anything that seems to work. Thanks!
{
"home_value":298900,
"page_url":"https://www.example.com/",
"parcel":{
"address":{
"full":"123 Main Street",
"city":"Raleigh",
"state":"NC",
"house":"2856",
"houseExt":null,
"street":"Jameson",
"streetPre":"W",
"streetPost":null,
"streetSuffix":"Rd",
"unit":null,
"unitType":null,
"zip":"27604",
"zip4":"3776"
},
"apn":"1725.14-22-9727 0145193",
"areas":[
{
"type":"Heated Building Area",
"areaSquareFeet":1574
},
{
"type":"Calculated Finished Area",
"areaSquareFeet":1574
}
],
"building":[
{
"noOfUnits":1,
"class":null,
"classDescription":null,
"quality":null,
"condition":null,
"architecturalStyle":"Conventional",
"yearBuilt":1986,
"effectiveYearBuilt":1986,
"totalStories":2,
"totalRooms":null,
"bedrooms":null,
"kitchens":null,
"fullBaths":2,
"baths":2,
"comments":null,
"occupancyStatus":"Assumed Owner Occupancy",
"heating":"Forced air",
"airConditioning":"Yes",
"foundation":null,
"fireplace":null,
"water":null,
"sewer":null,
"quarterBaths":null,
"halfBaths":0,
"threeQuarterBaths":null
}
],
"state":"NC",
"zoningCode":null,
"zoningDescription":"R-6",
"zpid":"6487528",
"county":"Wake County"
}
}