I have three object in my jeson response.I want to take first object’s label. How can I do this?
This is my code;
let createCarRes = http.post(requestUrlAdmin + 'Vehicles.createPck', createCarData,generateTokenHeader)
console.log("createdRes ",createCarRes.body.label[0])
This is json response;
[
{
"id": "1ae07d0a-8654-4830-adf5-4f4fe61a90c2",
"label": "Rene-37",
"createdAt": "2022-02-17T11:29:48.74058Z"
},
{
"id": "0fb82188-2d03-4f14-ae78-1567aedf3941",
"label": "Rene-39",
"createdAt": "2022-02-17T11:29:48.76813Z"
},
{
"id": "96ad9664-1a29-4519-95e4-eba265bf8175",
"label": "Rene-41",
"createdAt": "2022-02-17T11:29:48.78874Z"
}
]