in the object below
data.author.name
or
data.img[0].url
throws name is undefined, or 0 is undefined
or
same as some nested obeject pls how do i resolve this…?
{
"img": [
{
"_id": "60a3eeef1af8e4244ce2b035",
"name": "knots of love.jpg",
"alternativeText": "",
"caption": "",
"hash": "knots_of_love_7814a03a3f",
"ext": ".jpg",
"mime": "image/jpeg",
"size": 5.76,
"width": 124,
"height": 198,
"url": "/uploads/knots_of_love_7814a03a3f.jpg",
"formats": {
"thumbnail": {
"name": "thumbnail_knots of love.jpg",
"hash": "thumbnail_knots_of_love_7814a03a3f",
"ext": ".jpg",
"mime": "image/jpeg",
"width": 98,
"height": 156,
"size": 4.18,
"path": null,
"url": "/uploads/thumbnail_knots_of_love_7814a03a3f.jpg"
}
},
"provider": "local",
"related": [
"60a3ef061af8e4244ce2b036"
],
"createdAt": "2021-05-18T16:44:31.322Z",
"updatedAt": "2021-05-18T16:44:54.842Z",
"__v": 0,
"id": "60a3eeef1af8e4244ce2b035"
}
],
"_id": "60a3ef061af8e4244ce2b036",
"pageCount": 500,
"title": "Knots of love",
"description": "True Love knows no bound",
"datePublished": "2019-11-01",
"createdAt": "2021-05-18T16:44:54.832Z",
"updatedAt": "2021-05-18T16:45:11.295Z",
"__v": 0,
"author": {
"_id": "60a3e3591af8e4244ce2b031",
"name": "Robert Gold",
"createdAt": "2021-05-18T15:55:05.985Z",
"updatedAt": "2021-05-18T15:55:05.997Z",
"__v": 0,
"id": "60a3e3591af8e4244ce2b031"
},
"id": "60a3ef061af8e4244ce2b036"
}