I have two arrays one is the main array wherein I have different parameters and another array which have only two parameters that matches from first array.
I want to remove the complete item from first array if similar array(matched on these two parameter) matches.
Eg:
var mainArray = [{'Name':'Ticket1','TaskId':'b5de781e-9d25-49e7-af6d-3e254e894c04','ResourceId':'977dacf0-0b61-413e-a9a4-b469ab30d1b1',
'Status':'Completed'},{'Name':'Ticket2','TaskId':'c5ae581e-9f25-49e7-af6d-3e254e894c04','ResourceId':'37fdadf1-0b61-413e-a9a4-b469ab30d1b1',
'Status':'InProgress'},{'Name':'Ticket3','TaskId':'45af551e-9f25-49e7-af6d-3e254e894c04','ResourceId':'37fdadf1-0b61-413e-a9a4-b469ab30d1b1',
'Status':'InProgress'}];
var tmpArray = [{'TaskId':'b5de781e-9d25-49e7-af6d-3e254e894c04','ResourceId':'977dacf0-0b61-413e-a9a4-b469ab30d1b1'},{'TaskId':'45af551e-9f25-49e7-af6d-3e254e894c04','ResourceId':'37fdadf1-0b61-413e-a9a4-b469ab30d1b1'}];
I want my final array to have items which are not in tmpArray with similar TaskId and ResourceId only.
i.e my final array should look like
[{'Name':'Ticket2','TaskId':'c5ae581e-9f25-49e7-af6d-3e254e894c04','ResourceId':'37fdadf1-0b61-413e-a9a4-b469ab30d1b1',
'Status':'InProgress'}]
Here the items are removed as they had matching TaskId and ResourceId in tmpArray
mainArray.splice(startIndex, endIndex)to remove the items from the array.