I have seen the answer here:
access javascript object with space in key
But what would you do if
const parent = { "A B":
{
"1 2": "Hello",
"3": "World"
}
}
How would you change "Hello" to Hi?
I have seen the answer here:
access javascript object with space in key
But what would you do if
const parent = { "A B":
{
"1 2": "Hello",
"3": "World"
}
}
How would you change "Hello" to Hi?
Just the same, by multiple bracket notations in a row.
const parent = { "A B":
{
"1 2": "Hello",
"3": "World"
}
}
parent["A B"]["1 2"] = 'Hi';
console.log(parent);