What data structure is this in JavaScript? Is seems like a list, but then why does it have a curly brace and not the standard "[]"?
var states = {
"California": {
"Monterey": ["Salinas", "Gonzales"],
"Alameda": ["Oakland", "Berkeley"]
},
"Oregon": {
"Douglas": ["Roseburg", "Winston"],
"Jackson": ["Medford", "Jacksonville"]
}
}
I am interested in creating some sort of array that has a structure like this:
Colors: Red, Green, Blue, Orange, Yellow
Food: Bananas, Oranges
People: Me, You, Us, Them
...
Does something like this exist in Javascript?
Thanks!