Include Wrapper data in JSON Rest Call

Dear experts, I have a hard time trying to find a way to include a list of “additional drivers” into a REST call. Any ideas on how to solve that? Thanks Jonas   The respective JSON looks like the following: {     "gid": "USER_GID",     "tripId": "TRIP_ID",     "carId": "CAR_ID",     "pickupActual": "UNIX_TIMESTAMP",     "addDrivers": [         "GID1",         "GID2"     ] }    The export mapping:
3 answers

Hi Jonas,

Your mapping looks good, and I was able to create the correct JSON export using Mendix 8.2.2 with a similar structure. Are you sure you have everything correctly associated when you build your entities?

My test looked like this.

Which gave me


Hope this helps


I don’t understand the question. This mapping should include the List of additional drivers. Is the created json not what you expected?


In your export mapping, click button "Select elements”. Do not include the entity AddDrivers to the selected items of your Exportmapping

And for a better understanding of which entity does what, rename “AddDrivers” to “DriverWrapper” and “AdditionalDriversWrapper” to “Driver”. That gives you:

Btw, more people are having trouble with arrays of strings: 96287 and 95172