find an array from array of object in nodejs code example
Example 1: javascript find object array
const found = accesses.find(x => x.Resource === 'Clients');
console.log(found)
Example 2: find an object from array of objects javascript
function getByValue2(arr, value) {
var result = arr.filter(function(o){return o.b == value;} );
return result? result[0] : null; // or undefined
}