I need assistance with a specific object query. I am looking to execute the filter
function in order to retrieve a list of keys from an object where the condition is true, as shown below:
myObject = {
key1: {
name:"key1",
select:true
},
key2: {
name:"key2",
select:false
},
key3: {
name:"key3",
select:true
}
}
Due to certain requirements, I must now add a specific key and want to return an array containing only the keys with the value true
.
arrayWantreturn = ["key1", "key3"]
Your assistance with this would be greatly appreciated.