When I use {alert(JSON.stringify(cart[0]))} in my react-native app it shows me the whole array of object like this:
[{
"id": 3,
"name": John,
.
.
}]
but when I use {alert(JSON.stringify(cart[0].id))} for example it returns me undefined.