I'm trying to make a multiple dimensional array but i can't find a way to set both a unique index and value simultaneously, like this in PHP.
$Countries = array(
"America" => array(
"Delaware" => array(
"Population" => "967.171 (2018)", "KM2" => "6.446"
)
)
);
And i have tried to do the same in javascript but can't get it to work.
var Countries = [
"America" => [
"Delaware" => [
"Population" => "967.171 (2018)", "KM2" => "6.446"
]
]
];
I've also tried to replace the =>
with =
:
and ->
and none of them works either, so am i in a dead end?