I have an array containing objects.
I want to search the array using an if statement for objects that have a certain property and create a separate array containing only those objects.
var firstArray = [...]
for (var a = 0; a < firstArray.length; a++) {
if (firstArray[a].name == 'index.png') {
// create secondArray here
}
}
Thanks for your help!