I have a state variable that looks rather complex.. like this:
[
{
objName: nameOne,
objData: [
{
colName: [ colData ]
},
{
colName: [ colData]
}
]
},
...
]
For the first dropdown box, the data displayed is all the objName
s. And that works fine. But the second should display all the colName
s based on which ever objName
was selected. My problem is that the size of this is dynamic.
I basically just want to take what ever was selected and query the state variable like a dictionary and display all the column names. Is this possible?
I already have the code built out for the <select>
s. But I just dont know how to handle this. Any ideas?