Horje
loop array and check if value matches in js Code Example
loop array and check if value matches in js
var arr1 = [1, 3, 4,];

var arr2 = [
  {
    id: 1,
    title: 'Title 1',
   },
  {
    id: 2,
    title: 'Title 2',
   },
];

var res = arr2.filter(i => arr1.includes(i.id));

console.log(res);




Javascript

Related
string split javascript Code Example string split javascript Code Example
aos js Code Example aos js Code Example
javascript - get the filename and extension from input type=file Code Example javascript - get the filename and extension from input type=file Code Example
keypress javascript Code Example keypress javascript Code Example
read json from file js Code Example read json from file js Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
8