I am new to the world of javascript.
Can someone help me understand how to determine the intersection between an array and object in javascript?
Consider the following:
var users = [{name:'jony'}, {name: 'raja'}, {name: 'papy'}];
And the array is:
var currentUsers = ['jony', 'raja', 'singh'];
How can I achieve the desired result as shown below:
var resultArray = ['jony', 'raja'];