I have the following object:
var list = {
"to do": {
key: 99,
important: ["example1", "example2"],
others: ["example3", "example4"]
}
};
I want to understand how I can extract the value to do
from list
.
I want to log the value to a variable: var x = "to do"
I tried to locate it, but to do
does not seem to have an index. list[0] // undefined
.
Does anyone have a simple solution how to do this ?