How to use import mapping with JSON array of Strings

Hello everyone I am implementing an integration , where I am using call REST service activity to make an call to the external server. The server returns below JSON as response. I have created message definition & generated import mapping based on that. The question which I have here is  Within the reponse , "aud"  fields has an array of Strings. Can anyone help in me in mapping this  array of Strings ? I have seen in case of array of objects, I can create objects & use retrieve based on association to get the data.      {  "data": {         "org": {             "name": "Org14feb2023",             "Number": "19984675",             "aud": [                 "NY",                 "RE"             ],             "telephoneNumber": "31850208566",             "email": "email" } } }
1 answers

Hello G Dharani Kumar,


Instead of using a message definition I would advise you in this case to first create a JSON Structure: 




Copy paste your snippet in there click on format then click on refresh and then OK


Then create a import mapping based on this Structure/



Select JSON Structure and click select all and save:*




This will be the structure you need, to make life even easier select automatic mapping then mendix create the structure NP in your domain model;



Now you can make it again if you want as a message definition and you can map your full json.


Hope this helps


Good luck!