skip to Main Content

Javascript – how to build one to one relation between two array in angular

student:any=[{name:'shariful', id:'1',teacherId:'1'},{name:'Hasan', id:'2',teacherId:'2'},{name:'sohag', id:'3',teacherId:'2'}] teacher:any=[{name:'Robi',id:'1'},{name:'Aktarujaman',id:'2'}] needResult:any=[{name:'shariful', id:'1',teacherId:1,teacherName:'Robi'},{name:'Hasan', id:'2',teacherId:'2',teacherName:'Aktarujaman'},{name:'sohag', id:'3',teacherId:'1',teacherName:'Robi'}] I need to join student and teacher . the output is as like as needResult . Need to join in my angular project

VIEW QUESTION
Back To Top
Search