Hi there i have an nested object that looks like this
var dogTypes = {
GermanShepard {color: "black and white"},
Beagle {color: "brown and white"},
cheuwahwah {color: "green and white"},
poodle: {color: "purple and white"},
}
im trying to loop through all the properties in a nested object i know how to do that with a regular object but not a nested one so if someone could help me that would be great.
for (var key in dogTypes) {
console.log(key + " : " + dogTypes[key])
}
heres my code which prints out
GreatDane : [object Object]
GermanSheppard : [object Object]
Beagle : [object Object]
BullDog : [object Object]
where would i incorporate the color property in the for in loop please help!! thanks