Consumed REST Service – Mixed Type Array

Hi all – I need to consume a third party REST Service which unfortunately returns a Mixed Type JSON Array. These mixed type arrays are not supported by Mendix ( so I’m reaching out to see if anyone has either handled these before or has any advice on how to do so. An extract from the service response: "data": { "item": { "itemid": "223911", "column": [ { "sequence": "1", "attributecolumnid": "73958", "displaydata": { "value": "Lot 1" }, "rawdata": { "value": "Lot 1" } }, { "sequence": "2", "attributecolumnid": "73959", "displaydata": { "choices": { "choice": { "style": "#000000", "label": "Market Launch" } } }, "rawdata": { "choices": { "choice": { "style": "#000000", "label": "Market Launch" } } } }, Thanks very much!  
1 answers

Mendix can’t handle that. See this sensible idea which was closed shortly after being created and receiving quite some upvotes in no-time.

Workaround: Do the export mapping in three steps, first for the sequence-elements, the for the raw-data elements, then for the data elements in which you add a placeholder-text like “herecomesthecomplextype”. Postprocess the last mapping result containing the data and replace “herecomesthecomplextype” with the other two export mapping results.