I have two arrays,
array1 = [{name: "a", id: 1},{name: "b", id: 2},{name: "c", id: 3}]
and
array2 = [1, 2] // --which are the ids
I want to return a new array (array3) to display ["a", "b"] and if array2 = [1,3] then array3 should be ["a", "c"]
In other words, I would like to create a new array, with the names, corresponding to its id.