[Solved] 2 arrays matchings , transformation in arrays of objects [closed]

[ad_1]

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

[ad_2]

solved 2 arrays matchings , transformation in arrays of objects [closed]