I would like to copy nested value in an array of one document to another document.
As seen in the sample document below, I would like to copy all v4, v5, v6 which is in akvLabels of AKVFunctionDao document to another document of same type AKVFunctionDao which first matches the softwareFunctionName for the function and then the softwareLabelName of the label
Basically I want to copy v roles - v[4],v[5],v[6] from one AKVFunctionDao document whose akvId=lets say 1 to another AKVFunctionDao document whose akvId=lets say 2, but the criteria is softwareFunctionName should first match and then the softwareLabelName should match. There are many AKVFunctionDao having the same akvId but different softwareFunctionName and there are many akvLabels nested under each AKVFunctionDao having different softwareLabelName
Sample AKVFunctionDao document as below:
{
"akvId": “b8a15a50-ef2d-46e5-92e5-395237f80ef6”,
“akvLabels”: [
{
“akvFunctionId”: “001f5dd3-2a1f-4883-89bf-6b63cf00581b”,
“changedAt”: “2019-08-23T10:19:54.1940809+02:00”,
“changedBy”: “bea84932-dece-4607-b7d9-995340dc2344”,
“createdAt”: “2019-08-23T10:19:54.1940809+02:00”,
“createdBy”: “bea84932-dece-4607-b7d9-995340dc2344”,
“id”: “cfd187e2-3f79-4b86-b899-8956df7fdf03”,
“isPined”: null,
“labelType”: 1,
“projectId”: “c354575e-8f02-46a7-ad55-66333b936cff”,
“softwareLabelDescription”: “Anzahl aufeinanderfolgender Aussetzer für Bedingung Duaeraussetzer”,
“softwareLabelId”: “b6156076-3d22-4bb9-8875-df8af8efb0a3”,
"softwareLabelName": “MisfDet_nrCycMisfCont_C”,
“type”: “AKVLabelDao”,
"v4": “bea84932-dece-4607-b7d9-995340dc2344”,
“v4InChange”: null,
"v5": “1b2f511d-d24c-4518-acb8-4e21c73167e5”,
“v5InChange”: null,
"v6": “32dabf48-0f7a-497a-b2c7-533d6a740faf”,
“v6InChange”: null
},
{
“akvFunctionId”: “001f5dd3-2a1f-4883-89bf-6b63cf00581b”,
“changedAt”: “2019-08-23T10:19:54.1940809+02:00”,
“changedBy”: “bea84932-dece-4607-b7d9-995340dc2344”,
“createdAt”: “2019-08-23T10:19:54.1940809+02:00”,
“createdBy”: “bea84932-dece-4607-b7d9-995340dc2344”,
“id”: “6a514096-6925-4036-9b49-a2fff2062c5e”,
“isPined”: null,
“labelType”: 1,
“projectId”: “c354575e-8f02-46a7-ad55-66333b936cff”,
“softwareLabelDescription”: “Konfigurationsschalter FC SigSeln”,
“softwareLabelId”: “41d0fa25-6cfb-4b03-a612-ecab109ecc66”,
“softwareLabelName”: “MisfDet_stSigSelnCfg_C”,
“type”: “AKVLabelDao”,
“v4”: “bea84932-dece-4607-b7d9-995340dc2344”,
“v4InChange”: null,
“v5”: “1b2f511d-d24c-4518-acb8-4e21c73167e5”,
“v5InChange”: null,
“v6”: “32dabf48-0f7a-497a-b2c7-533d6a740faf”,
“v6InChange”: null
}
],
“changedAt”: “2019-08-23T10:19:54.1940809+02:00”,
“changedBy”: “bea84932-dece-4607-b7d9-995340dc2344”,
“createdAt”: “2019-08-23T10:19:54.1940809+02:00”,
“createdBy”: “bea84932-dece-4607-b7d9-995340dc2344”,
“id”: “001f5dd3-2a1f-4883-89bf-6b63cf00581b”,
“isExternalFunction”: true,
“isNeutral”: false,
“isNeutralInChange”: null,
“isPined”: null,
“projectId”: “c354575e-8f02-46a7-ad55-66333b936cff”,
“softwareFamiliy”: null,
“softwareFunctionDescription”: “Auswahl des Aussetzersignals für die statistische Auswertung”,
“softwareFunctionId”: “790a08fc-3b6c-4a12-8931-3064950cf165”,
"softwareFunctionName": “MisfDet_SigSeln”,
“type”: “AKVFunctionDao”,
“v0”: null,
“v1”: “4a644510-dbce-42fe-b729-18bbd5b0c842”,
“v10”: null,
“v10InChange”: null,
“v11”: “Bosch, Robert”,
“v11InChange”: null,
“v12”: null,
“v12InChange”: null,
“v13”: null,
“v13InChange”: null,
“v1InChange”: null,
“v2”: null,
“v2InChange”: null,
“v7”: “f40e038c-e80a-49a0-8384-aae72fbbd7b9”,
“v7InChange”: null
}