Hello,
I have a main collection called Services, in which I have 3 nested collections Service / Total Amount / Dates
I would like to retrieve the item Service Date, based on the Code REFRESH. But Service Date & Code are not on the same collection, so I feel I cannot use the map(map…
Can someone help me?
"services": [
{
"service": {
"id": "DE_BE_004-BIKE",
"code": "BIKE",
"name": "Bike",
"description": "Bike",
"pricingUnit": "Person",
"defaultGrossPrice": {
"amount": 20,
"currency": "EUR"
}
},
"totalAmount": {
"grossAmount": 60,
"netAmount": 50.43,
"vatType": "Normal",
"vatPercent": 19,
"currency": "EUR"
},
"dates": [
{
"serviceDate": "2024-10-08",
"count": 1,
"amount": {
"grossAmount": 20,
"netAmount": 16.81,
"vatType": "Normal",
"vatPercent": 19,
"currency": "EUR"
},
"isMandatory": false
},
{
"serviceDate": "2024-10-09",
"count": 1,
"amount": {
"grossAmount": 20,
"netAmount": 16.81,
"vatType": "Normal",
"vatPercent": 19,
"currency": "EUR"
},
"isMandatory": false
},
{
"serviceDate": "2024-10-10",
"count": 1,
"amount": {
"grossAmount": 20,
"netAmount": 16.81,
"vatType": "Normal",
"vatPercent": 19,
"currency": "EUR"
},
"isMandatory": false
}
]
},
{
"service": {
"id": "DE_BE_004-REFRESH",
"code": "REFRESH",
"name": "Room Refresher",
"description": "Room Refresher",
"pricingUnit": "Room",
"defaultGrossPrice": {
"amount": 10,
"currency": "EUR"
}
},
"totalAmount": {
"grossAmount": 30,
"netAmount": 30,
"vatType": "Without",
"vatPercent": 0,
"currency": "EUR"
},
"dates": [
{
"serviceDate": "2024-10-07",
"count": 1,
"amount": {
"grossAmount": 10,
"netAmount": 10,
"vatType": "Without",
"vatPercent": 0,
"currency": "EUR"
},
"isMandatory": false
},
{
"serviceDate": "2024-10-08",
"count": 1,
"amount": {
"grossAmount": 10,
"netAmount": 10,
"vatType": "Without",
"vatPercent": 0,
"currency": "EUR"
},
"isMandatory": false
},
{
"serviceDate": "2024-10-09",
"count": 1,
"amount": {
"grossAmount": 10,
"netAmount": 10,
"vatType": "Without",
"vatPercent": 0,
"currency": "EUR"
},
"isMandatory": false
}
]
}
],