I have one obj that I received from the client,
const record = {
"date":"2021-09-20",
"startAt":"10:00",
"endAt":"16:00",
"employeeId": [5,2],<==
"projectId":[50,48],<==
"notes":"blahhh"
}
I want to convert it to some objects, same details , but I want for example employeeId 5 worked in two projects, 50 and 48 I want to have two objects with same details but the employeeId is 50 and the projectId : first object with 50 and the sec obj with 48
{
....
"employeeId": [5],<== //first emplyee
"projectId":[50],<== // first project
....
}
{
....
"employeeId": [5],//first emplyee
"projectId":[48], // sec project
...
}
{
....
"employeeId": [2],//sec employee
"projectId":[50], //first project
....
}
{
....
"employeeId": [2],//sec employee
"projectId":[48], //sec project
....
}
thank you for helping me