I need help figuring out how to access the "description" property of a JSON object I received from an API endpoint. The object looks like this: - "description" : "Dorian Market 1"?
let markets = {
"result":[
{
"townId" : "MEBD",
"storeId" : "1",
"address" : "Presernova 1",
"description" : "Dorian Market 1",
"minOrderValue" : "500",
"notes" : ""
}
,
{
"townId" : "MEBD",
"storeId" : "1",
"address" : "Presernova 2",
"description" : "Dorian Market 2 ",
"minOrderValue" : "500",
"notes" : ""
}
]
}
Am I on the right track by trying to access the description using markets.result[0].description? Is there a better way?