When I have an array inside an object in dynamodb and I query that object using the Simplify, the array that should be inside the object returns a null value. When I use it without the Simplify, the data returns normally. As you can see in the example below in the ‘affiliates’ and ‘commissions’ fields.
JSON from dinamodb without using the Simplify:
[
{
"id_eventoTransacao": {
"S": "8aefe5c0-1c85-4715-bc8b-cfb25c3247a7"
},
"id_cliente": {
"S": "f2b2dee5-388d-4c0e-9d5a-b80e5a7d7153"
},
"cd_json": {
"M": {
"id": {
"S": "8aefe5c0-1c85-4715-bc8b-cfb25c3247a7"
},
"creation_date": {
"N": "1706014674487"
},
"data": {
"M": {
"purchase": {
"M": {
"offer": {
"M": {
"code": {
"S": "pys8kv2p"
}
}
},
"order_date": {
"N": "1706014659000"
},
"original_offer_price": {
"M": {
"currency_value": {
"S": "BRL"
},
"value": {
"N": "997"
}
}
},
"subscription_anticipation_purchase": {
"BOOL": false
},
"price": {
"M": {
"currency_value": {
"S": "BRL"
},
"value": {
"N": "997"
}
}
},
"checkout_country": {
"M": {
"iso": {
"S": "BR"
},
"name": {
"S": "Brasil"
}
}
},
"order_bump": {
"M": {
"is_order_bump": {
"BOOL": false
}
}
},
"payment": {
"M": {
"refusal_reason": {
"S": "Saldo insuficiente para o cartão informado. Entre em contato com a operadora."
},
"installments_number": {
"N": "12"
},
"type": {
"S": "CREDIT_CARD"
}
}
},
"full_price": {
"M": {
"currency_value": {
"S": "BRL"
},
"value": {
"N": "1194"
}
}
},
"invoice_by": {
"S": "HOTMART"
},
"status": {
"S": "CANCELED"
}
}
},
"affiliates": {
"L": [
{
"M": {
"name": {
"S": ""
},
"affiliate_code": {
"S": ""
}
}
}
]
},
"commissions": {
"L": [
{
"M": {
"currency_value": {
"S": "BRL"
},
"value": {
"N": "64.81"
},
"source": {
"S": "MARKETPLACE"
}
}
},
{
"M": {
"currency_value": {
"S": "BRL"
},
"value": {
"N": "464.84"
},
"source": {
"S": "PRODUCER"
}
}
}
]
}
}
},
"event": {
"S": "PURCHASE_CANCELED"
},
"version": {
"S": "2.0.0"
}
}
}
}
]
JSON when using the Simplify:
[
{
"id_eventoTransacao": "8aefe5c0-1c85-4715-bc8b-cfb25c3247a7",
"id_cliente": "f2b2dee5-388d-4c0e-9d5a-b80e5a7d7153",
"cd_json": {
"id": "8aefe5c0-1c85-4715-bc8b-cfb25c3247a7",
"creation_date": 1706014674487,
"data": {
"purchase": {
"offer": {
"code": "pys8kv2p"
},
"order_date": 1706014659000,
"original_offer_price": {
"currency_value": "BRL",
"value": 997
},
"subscription_anticipation_purchase": false,
"price": {
"currency_value": "BRL",
"value": 997
},
"checkout_country": {
"iso": "BR",
"name": "Brasil"
},
"order_bump": {
"is_order_bump": false
},
"payment": {
"refusal_reason": "Saldo insuficiente para o cartão informado. Entre em contato com a operadora.",
"installments_number": 12,
"type": "CREDIT_CARD"
},
"full_price": {
"currency_value": "BRL",
"value": 1194
},
"invoice_by": "HOTMART",
"status": "CANCELED"
},
"affiliates": null,
"commissions": null
},
"event": "PURCHASE_CANCELED",
"version": "2.0.0"
}
}
]
In the example you gave, there is no array within the created object.