I have an array of objects and I need to search for objects with a specific property. Once found, I want to create a new array only containing those objects.
var firstArray = [...]
for (var i = 0; i < firstArray.length; i++) {
if (firstArray[i].name == 'index.png') {
// create secondArray here
}
}
Any assistance on this matter would be greatly appreciated!