I have a string value (e.g. "Table 1") that I need to use to find a specific object in an array that looks like so:
[
{
lookups: [],
rows: [{data: {a: 1, b: 2}}, {data: {a: 3, b: 4}}],
title: "Table 1",
columns: [{name: "a"}, {name: "b"}]
},
{
lookups: [],
rows: [{data: {c: 5, d: 6}}, {data: {c: 7, d: 8}}],
title: "Table 2",
columns: [{name: "c"}, {name: "d"}]
}
]
Once I have found that object I then need to take the values from the columns key and display them in a select list.
I know how to do the second part, but it is getting access to the object in the first place that I am having trouble with. I am trying to do this within a React component render.
Any help with this would be greatly appreciated.
Thanks for your time.