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 objNames. And that works fine. But the second should display all the colNames 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?