I have a class "Imgs" with many different properties. And i have a variable with a string which is the name of 1 property. Now i want to make a loop for an array (pictures) which consists of many "Imgs" and want to use the property from the string.
This shows what i want, but it does not work of course ;/
Edit: Of course there ist a .xyz property for "Imgs" and many others but that doesnt matter for this example.
var property = "xyz";
for (i in pictures) {
if (pictures[i].property) { . . . }
}
greetings, I appreciate your help