1let firstArray = ["One", "Two", "Three", "Four", "Five"];
2let secondArray = ["Three", "Four"];
3
4let map = {};
5firstArray.forEach(i => map[i] = false);
6secondArray.forEach(i => map[i] === false && (map[i] = true));
7let jsonArray = Object.keys(map).map(k => ({ name: k, matched: map[k] }));