JSFiddle - React, Tailwind, and code Playground

by nickadeemus2002

JavaScript

var x =[
{name : 'mark' , number : '10' , color:'green'},
{name : 'jeff' , number : '15' , color:'blue'} ,
{name : 'joy' , number : '30' , color:'yellow'},
{name : 'mick' , number : '15' , color:'red'},
{name : 'mick' , number : '40' , color:'black'}] ; 

var y =['40','15'];

for(i=0; i <= y.length; i++){
var newObject = $.map(x  ,function(index, value){
    for(i in y){
        if(index.number == y[i])
        {return null ; }
        else{
            return index;
                }      
    }
    
    });
}

console.log(newObject);