filter an array of objects and match its key with values inside another array
var arr = [1,2,3,4],
brr = [2,4],
res = arr.filter(f => !brr.includes(f));
console.log(res);const arr = [1, 2, 3, 4]
const brr = [2, 4]
const res = arr.filter((f) => !brr.includes(f))
console.log(res)
Also in JavaScript:
- javascript cast bool to int
- javascript base64 encode string
- get epoch timestamp js
- terminal tree command
- free map js
- parsefloat jquery
- set readonly in javascript
- javascript for loop starting from end
- jquery datepicker
- Basic JavaScript: Use Recursion to Create a Range of Numbers
- mute video javascript
- javascript promise
- nested array loop in javascript
- : Cannot set the body fields of a Request with content-type "application/json".
- js add click listener
- do i have to include jquery files at head of bootstrap
- angular navigate using component
- notification bell icon bootstrap react
- ajax call to load a page on scrolling
- javascript sendredirect
- ModuleBuildError: Module build failed (from ./node_modules/sass-loader/lib/loader.js): Error: ENOENT: no such file or directory, scandir
- python object to json
- json decode android
- nodejs add element to array