Yes:
let array = ["ABC", "BCA", "CDA", "APA"]
let array2 = ["ABC", "APA"]
const output = array.map((item) => {
let isFound = array2.includes(item);
return { value: item, matched: isFound };
})
console.log(output)
1
solved 2 arrays matchings , transformation in arrays of objects [closed]