This is the result without using StripLevels
{
"Envelope": {
"Header": null,
"Body": {
"getFormatosEmpresaResponse": {
"formatos": [
{
"producto": {
"id": 1,
"desc": "Crédito y Seguro"
},
"plantilla": {
"id": 115197,
"desc": "ESTANDAR CCLA",
"tipoFormato": {
"desc": "PDF"
}
},
"artefacto": null,
"sucursal": {
"id": 1,
"nombre": "Sucursal 1"
},
"tipoFormato": "Estandar"
}
],
"estado": {
"codigo": 0,
"descripcion": "Operacion Exitosa"
}
}
}
}
}
This is the result using StripLevels
{
"Header": null,
"Body": {
"getFormatosEmpresaResponse": {
"formatos": [
{
"producto": {
"id": 1,
"desc": "Crédito y Seguro"
},
"plantilla": {
"id": 115197,
"desc": "ESTANDAR CCLA",
"tipoFormato": {
"desc": "PDF"
}
},
"artefacto": null,
"sucursal": {
"id": 1,
"nombre": "Sucursal 1"
},
"tipoFormato": "Estandar"
}
],
"estado": {
"codigo": 0,
"descripcion": "Operacion Exitosa"
}
}
}
}
This is the expected result
{
"formatos": [
{
"producto": {
"id": 1,
"desc": "Crédito y Seguro"
},
"plantilla": {
"id": 115197,
"desc": "ESTANDAR CCLA",
"tipoFormato": {
"desc": "PDF"
}
},
"artefacto": null,
"sucursal": {
"id": 1,
"nombre": "Sucursal 1"
},
"tipoFormato": "Estandar"
}
],
"estado": {
"codigo": 0,
"descripcion": "Operacion Exitosa"
}
}
This is the XMLToJson
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<XMLToJSON continueOnError="false" enabled="true" name="x2j-formatos-empresa">
<DisplayName>X2J Formatos Empresa</DisplayName>
<Properties/>
<OutputVariable>response</OutputVariable>
<Source>response</Source>
<Options>
<RecognizeNumber>true</RecognizeNumber>
<RecognizeBoolean>true</RecognizeBoolean>
<RecognizeNull>true</RecognizeNull>
<TextAlwaysAsProperty>false</TextAlwaysAsProperty>
<StripLevels>3</StripLevels>
<TreatAsArray>
<Path unwrap="true">Envelope/Body/getFormatosEmpresaResponse/formatos/formato</Path>
</TreatAsArray>
</Options>
</XMLToJSON>
