I am new to programming world. I would like to know how can I do the following. array of objects
const arrOfObj = [{ id: "id1", name: "A1", rollno: "1"}, {id: "id2", name: "A2", rollno: "2"}, { id: "id3", name: "A3", rollno: "3"}]
another object list
const obj = {"id1": "absent", "id2": "present"}
create a new array of obj by mapping through "obj" and map through "arrOfObj" and check if "id" matches then create
const newArrOfObj = [{ id: "id1", name: "A1", attendance: "absent"}, {id: "id2", name: "A2", attendance: "present"}]
not sure how to do
const newArrOfObj = Object.entries(obj).map()