Suppose I have a variable named x with the following structure:
x = {
choice1: {
choice: {
name: "choice1",
text: "abc",
key: "key1"
}
isChecked: true
},
choice2: {
choice: {
name: "choice2",
text: "def ",
key: "key2"
}
isChecked: false
}.
choice3: {
choice: {
name: "choice3",
text: "ijk ",
key: "key3"
}
isChecked: false
}
}
I am looking to retrieve the key for which isChecked is true.
Any help would be greatly appreciated. Thank you!