I am not sure how to get the nested object data in react jsx, can anyone help me?
wine:
{
_id: "5b21ca3eeb7f6fbccd471815",
name: "Margaux",
wineType: { _id: "5b21ca3eeb7f6fbccd471818", name: "Red Wine" },
numberInStock: 5,
vintage: 1982,
volume: 750,
imageURL:
"www.abc.come",
region: { _id: "2", name: "Bordeaux" },
price: 18000
},
I am looking for the name in region object,
I try testing {wine.region.name} but having error.
TypeError: Cannot read property 'name' of undefined
variableName.Wine.region.nameWinebut you are accessing it will small letter{wine.region.name}