You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
405 B
13 lines
405 B
7 months ago
|
export function compareArrays(arr1: { id: any; type: any; componentRef: any }[], arr2: any[]) {
|
||
|
const val: any[] = [];
|
||
|
arr1.map((item: { id: any; type: any; componentRef: any }) => {
|
||
|
const ret = arr2.find((ev) => {
|
||
|
return ev.id === item.id && ev.type == item.type && ev.componentRef == item.componentRef;
|
||
|
});
|
||
|
if (ret == undefined) {
|
||
|
val.push(item);
|
||
|
}
|
||
|
});
|
||
|
return val;
|
||
|
}
|