The array with objects:
var myArr = [ { user: 'jane', properties: ['prop1', 'prop2'] }
{ user: 'bob', properties: ['prop1', 'prop4'] }
{ user: 'dave', properties: ['prop1', 'prop2', 'prop3'] }
{ user: 'tim', properties: ['prop4', 'prop2', 'prop3'] }
];
Is there a way in pure javascript or perhaps using lodash to obtain the users that have at least one property in common? The output should indicate which user matches with which user, without duplicates.
I've tried a number of things, but unfortunately was not able to get the desired output.