I have a target array [\"apple\",\"banana\",\"orange\"], and I want to check if other arrays contain any one of the target array elements.
[\"apple\",\"banana\",\"orange\"]
For example:
I came up with a solution in node using underscore js like this:
var checkRole = _.intersection(['A','B'], ['A','B','C']); if(!_.isEmpty(checkRole)) { next(); }