db.getCollection("orderhistories").aggregate([
{$match:{orderId:9335}},
{$project:{
"workshop":{
"addOnService" :{
"serviceId":1,
"product":1
},
"inclusiveService":{
"serviceId":1,
"product":1
},
}
}},
{
$addFields: {
"array1": { $concatArrays: [ "$workshop.inclusiveService", "$workshop.addOnService" ] }
}
},
])