I have a foreach statement that I'd like to use a variable in place of index for example.
Right now this works fine.
ForEach(vm.trainingdata) { index in
Text(index.foo1.data)
}
What I would like to do is this, but because index... is stored as a string I'm just getting back a string (which is expected I know).
ForEach(vm.trainingdata) { index in
fooArray = ["index.foo1.data", "index.foo2.data"]
Text(fooArray[2])
}