How to map JSON response with [] into domain model?

Hi guys   I have JSON Response which I want to map to domain model, but got issues with the "[ ]". JSON: {"lastUpdateId":47006981,"bids":[["0.00033100","116.29000000",[]],["0.00033030","64.33000000",[]],["0.00033020","246.82000000",[]],["0.00033010","361.45000000",[]],["0.00033000","505.37000000",[]]],"asks":[["0.00033150","1266.90000000",[]],["0.00033160","37.76000000",[]],["0.00033190","3.25000000",[]],["0.00033200","4.40000000",[]],["0.00033210","3.03000000",[]]]} When pasting this snippet into JSON structure it indicates an error, while it is actually valid. Workaround As a workaround I thought to replace all "[ ]", by replaceAll($JSON,'\\[\\]','')  (or varitions) would work ,but unfortunately, it is not working Anyone an idea how I got the JSON mapping working or replacing the string ?  
1 answers

I got this to work as follows:

  • for the JSON structure, delete the empty [] and the preceding comma throughout the JSON
  • create the JSON structure
  • create an import mapping
  • create a microflow with a string variable containing all of the JSON, including the trailing empty arrays
  • import that variable using an Import with Mapping action.

This worked for me.  Hope that helps.


JSON structure dialog box with the JSON from your forum posting.  Note that I've removed the empty arrays in this dialog box and formatted for readability.

Create an import mapping with that JSON structure

Map automatically to create the entities and, after setting permissions on the new entities, create a microflow that looks like this

and finally a picture of the contents of $variableJSON