my problem might not be as challenging as some other similar questions but they were a little to much for me.
I have an array of objects that I need to filter by name against a string array of names, if the names match I want to remove the object with the name that matches
so like the following:
nameObjects = [{name: 'name3', value: 'some val'},{name: 'name1', value:'some other val'}]
names = ['name1','name2','name3']
I've tried the following just using for loops but I'm sure that there is a quicker (and correct lol) filter method that works
for(i=0; i < this.names.length; i++){
for(j=0; j < this.nameObjects.length; j++){
if(this.names[i] === this.nameObjects[j].name){
this.files.splice(i,this.nameObjects[j])
}
}
}
also sorry for the poor logic ^