Hi, i have been trying to invoke a rest api where the api response is a list of json objects (sample provided below). I have tried using the import map to map my response and output it to a dataview in a page, but because of the array response, mendix is not able to map the response correctly and hence I'm unable to display the api response / manipulate the data received from the api in any manner. Is there any solution to it. api sample response - [ { "usecaseId": 2, "usecaseName": "Sample UseCase", "usecaseDescriptionLocal": "Sample UseCase Jp", "usecaseDescriptionEnglish": "Sample UseCase", "usecaseDetailLocal": "Sample UseCase Jp", "usecaseDetailEnglish": "Sample UseCase", "userLists": [ { "useCaseId": null, "ulistId": 1, "userListName": "Sample UserList", "userListDescriptionLocal": "Sample UserList Jp", "userListDescriptionEnglish": "Sample UserList", "userListDetailLocal": "Sample UserList Jp", "userListDetailEnglish": "Sample UserList test", "userListUserName": "Sample UseCase_Sample UserList", "userListPassword": "Nj11JWFxclA=", "useCustomUserName": false, "useCustomPassword": false } ] }, ] this is my current import mapping Current Microflow (the iterators and retrieval i had added in an attempt to extract the userlists from the nested json object, but failed. Feel free to provide the correted flow) API Response stored to variable (ULMDetails) - can view that the userlist data is not being saved to the api response
asked
Ashish Philip
1 answers
0
The associated entity is not always shown in the debugger especially when that entity is not the owner of the association (in this case `JsonObject` is not the owner of `UserList_JsonObject_2`). However, you can still retrieve the associated object via microflow action (See my debugging output below). Hopefully this helps.