What would be a short and concise way to find if each of the strings in the array below exists for some id in an object in the array? I know I could perform a for loop, but if I'm running multiple lookups it becomes tedious.
The below example should output false because one matches, one doesn't.
var array1= [
'j2n4k2j3n42k3j4n',
'ln23jk4n2njknn2n'
]
var array2 = [
{
fruit:"banana"
origin:"florida"
id:"j2n4k2j3n42k3j4n"
},
{
fruit:"peach"
origin:"georgia"
id:"l2nkj2n3k4bj"
},
]