arrayofobjectsintersection
v1.0.5
Published
This will return the array of objects that are common in a set of array of objects based on single or multiple keys
Downloads
9
Maintainers
Readme
let firstArray = [ { "id":"test", "displayName" : "Test" } { "id":"demo", "displayName" : "Demo" } ]; let secondArray = [ { "id" : "test", "displayName" : "Test" } ]; let thirdArray = [ { "id" : "test", "displayName" : "Test" }, { "id" : "user", "displayName" : "User" } ] testModule.findCommonObjectsOfArrays(["id"], firstArray, secondArray, thirdArray);
//result will be [ { "key" : "test", "displayName" : "Test" } ]