I have an fire object obj.
I JSON.stringify(obg)ed the object and it gives
{"12:23:34:45":{"Brand":"Sams","Carrier":"Car 1"},"23:34:45:56":{"Brand":"Sams","Carrier":"Car 2"}}
Beautified version is
{
"12:23:34:45":
{
"Brand":"Sams",
"Carrier":"Car 1"
},
"23:34:45:56":
{"Brand":"Sams",
"Carrier":"Car 2"
}
}
What I have tried is to loop through this object to get the Carriers but it failed
for(let i in obj){
console.log(i.Carrier);
}
I want to get the keys (12:23:34:45 and 23:34:45:56) from this object but not sure how to do this.