I have the following object consisting of three other objects of type array :
I want to get the text samsung
out of that object and the rest of the objects. I have tried using a for in loop but I am getting the keys 0, 1 , 2
.
for(brand in brands){
console.log(brand) // prints out `0, 1 , 2`
}
so I added another nested for in loop, but than I get 0, 0, 0
which are the keys within samsung, and other array objects within the rest of the objects.
What am i missing ?