I'm working on a cascading dropdown in Retool, and I'm trying to access the nested values within the structure. Here is an example of the data I'm using:
[
{
"value": "a",
"label": "A"
},
{
"value": "b",
"label": "B"
},
{
"value": "c",
"label": "C"
},
{
"value": "d",
"label": "D"
},
{
"value": "e",
"label": "E"
},
{
"value": "f",
"label": "F",
"children": [
{
"value": "h",
"label": "H"
}
]
},
{
"value": "i",
"label": "I",
"children": [
{
"value": "k",
"label": "K"
},
{
"value": "m",
"label": "M"
}
]
}
]
normal value I can access that way
{{ xyz.value == "a" }}
I'm trying to figure out how I can access nested values like "h"
, "k"
, and "m"
. I want the dropdown to show both parent and child values. Any guidance on how to do this in Retool would be greatly appreciated!
Thanks!