JSFiddle - React, Tailwind, and code Playground

by nickadeemus2002

JavaScript

$(document).ready(function(){

var x =[ //this is the object 
  {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']; // i need to remove all object.number that match the 
        // number in this array
    $.each(y, function(i,v){
         var newObject = $.map(x  ,function(index, value){
        for(i in y){
         if(index.number == v)
        {return null ; }
       else{
        return index;
            }      
      }
 console.log(newObject);
        });
    });
});