Hi All,
Trying to see if I am defining the structure wrong or if I need to do postprocessing to remove these [ ] when there is only 1 element in a record from my JSON file. The below structure
structure = [
{ID:'PO850',MIN:1,MAX:1,
QUERIES:{
'frompartner': get_frompartner,
'topartner': get_topartner,
},
LEVEL:[
{ID:"from_partner",MIN:1,MAX:1},
]},
]
is producing this
{
"PO850": {
"po_date": "10/23/2024",
"from_partner": [
{
"city": "TESTCITY",
"name": "TEST",
"zip": "11111",
"address1": "2365 Ave",
"state": "XX",
"id": "999999999"
}
]
}
}
even though from_partner is only MIN/MAX of 1, it puts it in a list [ ].
Is there a way to stop this?
Can I have just multiple roots or there has to be only one, since PO850 seems to place things in { } only and not a list [ ]?
Thanks
--
You received this message because you are subscribed to the Google Groups "Bots Open Source EDI Translator" group.
To unsubscribe from this group and stop receiving emails from it, send an email to botsmail+u...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/botsmail/ac077c45-9919-4bfd-a500-1623be7efc4dn%40googlegroups.com.