const absentStudentsId = [78, 15, 41, 30] // ======> [{stdId: 78, isPresent: false}, {stdId: 15, isPresent: false}, {stdId: 41, isPresent: false}, {stdId: 30, isPresent: false}]
const presentStudentsId = [80, 61] // ======> [{stdId: 80, isPresent: true}, {stdId: 61, isPresent: true}]
const students = [
{ stdId: 78, isPresent: false },
{ stdId: 15, isPresent: false },
{ stdId: 41, isPresent: false },
{ stdId: 30, isPresent: false },
{ stdId: 80, isPresent: true },
{ stdId: 61, isPresent: true },
]
I want to implement that logic as you see in the commented line.