Hello guys I have a doubt regarding JavaScript Objects!. Thanks in advance for any future answers. I will explain my situation here. 1)I have 3 objects named courses,admission_details,attendance. 2)I need to create another object from this 3 objects.
const COURSES=[
{
PROGRAM: "BTech",
COURSE: 'PHYSICS',
FEE:200
},
{
PROGRAM: "BTech",
COURSE: 'CHEMISTRY',
FEE:200
},
{
PROGRAM: "BTech",
COURSE: 'BIOLOGY',
FEE:200
}
]
const ADMISSION_DETAILS=[
{
NAME:'AJU', REGISTER_NUMBER:'JAJEGJAFD512315',
EMAIL:'xxxxxasdf@gmail.com',
PHONE:'974654645454'
}
]
const ATTENDANCE = [
{
NAME: 'AJU',
REGISTER_NUMBER: 'JAJEGJAFD512315',
ATTENDANCE:{
PHYSICS:75,
CHEMISTRY:86,
BIOLOGY:40
}
}
]
const desired_output=[
{
NAME:'AJU',
REGISTER_NUMBER:'JAJEGJAFD512315',
EMAIL:'xxxxxasdf@gmail.com',
PHONE:'974654645454',
PROGRAM: "BTech",
COURSE:"PHYSICS",
ATTENDANCE:75,
FEE:200,
},
{
NAME:'AJU',
REGISTER_NUMBER:'JAJEGJAFD512315',
EMAIL:'xxxxxasdf@gmail.com',
PHONE:'974654645454',
PROGRAM: "BTech",
COURSE:"CHEMISTRY",
ATTENDANCE:86,
FEE:200
},
{
NAME:'AJU',
REGISTER_NUMBER:'JAJEGJAFD512315',
EMAIL:'xxxxxasdf@gmail.com',
PHONE:'974654645454',
PROGRAM: "BTech",
COURSE:"BIOLOGY",
ATTENDANCE:40,
FEE:200
}
]