Hello, I am trying to save a document with the following structure but it gives me an error, I understand that it is an error in the map since validationForm.content.value is for some cases as an object and in other cases not.
How can I generate the map, because I tried don nested but it generates the same error, we need to save this structure from this document.
{
"productId": "600f4dd59a40ae00080712df",
"clientId": "600f4dd59a40ae00080712db",
"addressId": "600f4dd59a40ae00080712dd",
"validationForm": {
"content": [
{
"id": "600840d9fdcedc00081cc744",
"value": "17.388.047-2",
"key": "rut",
"label": "RUT",
"type": "rut"
},
{
"id": "600840d9fdcedc00081cc745",
"value": "Esteban Alfredo ",
"key": "name",
"label": "Nombre",
"type": "text"
},
{
"id": "600840d9fdcedc00081cc747",
"value": {
"lat": -32.7293178,
"lng": -71.2074179,
"placeId": "ChIJgagy_rjKiZYR7aR3Ms_SiX4",
"address": "Pasaje 6 315, Nogales, Chile",
"additionalInfo": "pasaje 6 315, NOGALES ",
"street": "Pasaje 6",
"streetNumber": "315",
"commune": "Nogales",
"region": "Valparaíso",
"formattedAddress": null
},
"key": "address",
"label": "Dirección",
"type": "address"
}
]
}
}
Error
{
"error" : {
"root_cause" : [
{
"type" : "illegal_argument_exception",
"reason" : "can't merge a non object mapping [validationForm.content.value] with an object mapping"
}
],
"type" : "illegal_argument_exception",
"reason" : "can't merge a non object mapping [validationForm.content.value] with an object mapping"
},
"status" : 400
}
thanks