Hello community,
I have the following scenario,
I have a array of student details. It has fields like student id, subject id, question paper id. I want to group by subject id and update the question paper id in the array.
Given Array 1:
{student id: 100, subject id: "S1", question paper id: },
{student id: 200, subject id: "S2", question paper id: },
{student id: 300, subject id: "S1", question paper id: },
{student id: 400, subject id: "S2", question paper id: }
{student id: 300, subject id: "S3", question paper id: },
Array 2:
{Q1,Q2,Q3}
Array 3 :
{ S1,S2,S3}
Expected Output:
{student id: 100, subject id: "S1", question paper id: "Q1"},
{student id: 200, subject id: "S2", question paper id: "Q2"},
{student id: 300, subject id: "S1", question paper id: "Q1"},
{student id: 400, subject id: "S2", question paper id: "Q2"}
{student id: 300, subject id: "S3", question paper id: "Q3"},
Discussion posts and replies are publicly visible