array1 = [{
questionId: "5e52b55330bb2cee102b9a39",
note: "Name",
prefillValue: "prasanna"
},
{
questionId: "5e52b56b30bb2cee102b9a3f",
note: "Mobile Number",
prefillValue: null
},
{
questionId: "5e52b58230bb2cee102b9a42",
note: "Agent Email",
prefillValue: null
},
{
questionId: "5e52b55e30bb2cee102b9a3c",
note: "Email",
prefillValue: null
},
{
questionId: "5e52c39730bb2cee102b9a47",
note: "Agent ID",
prefillValue: null
},
{
questionId: "5e54dbdd30bb2c6018f488ca",
note: "Location",
prefillValue: null
}
]
array2 = [{
questionId: "5e52b55e30bb2cee102b9a3c",
note: "Email",
prefillValue: "skk@gmail.com"
},
{
questionId: "5e52c39730bb2cee102b9a47",
note: "Agent ID",
prefillValue: "34"
},
{
questionId: "5e54dbdd30bb2c6018f488ca",
note: "Location",
prefillValue: "Chennai"
}
]
Ожидаемый результат:
array3 = [{
questionId: "5e52b55330bb2cee102b9a39",
note: "Name",
prefillValue: "prasanna"
},
{
questionId: "5e52b56b30bb2cee102b9a3f",
note: "Mobile Number",
prefillValue: null
}, {
questionId: "5e52b58230bb2cee102b9a42",
note: "Agent Email",
prefillValue: null
}, {
questionId: "5e52b55e30bb2cee102b9a3c",
note: "Email",
prefillValue: null
}, {
questionId: "5e52b55e30bb2cee102b9a3c",
note: "Email",
prefillValue: "skk@gmail.com"
}, {
questionId: "5e52c39730bb2cee102b9a47",
note: "Agent ID",
prefillValue: "34"
},
{
questionId: "5e54dbdd30bb2c6018f488ca",
note: "Location",
prefillValue: "Chennai"
}
]