I have an array that looks like this:
var roles = [
{ "label": "Super Auditor", "value": 4 },
{ "label": "Super Finance Officer", "value": 3 },
{ "label": "Super Manager", "value": 2 },
{ "label": "Super Admin", "value": 1 }
]
I need to find if it is in array and get that object.
var needToFind = [4, 1]
Expected Results:
var results =[
{ "label": "Super Auditor", "value": 4 },
{ "label": "Super Admin", "value": 1 }
]
I just don't know how to do it. TY