Multilevel json data accesss. - Mendix Forum

Multilevel json data accesss.

0

I’ve created Import mapping of a json data.

The Domain Model looks like this

I’ve created unfinished micro flow which return List of JsonObject_2. I want to store JsonObject_2 to a DataGrid.

I know I’ve to use another Retrieve action which will retrieve Data entity but the “JsonObject_Data” association option is not present for that retrieve option.

So, how can I access JsonObject_2 data and load it to Table.

asked
5 answers
3

I think you want to da a retrieve by association to get the data objects associated with your json object. As you have a List of JsonObjects, this is not possible. The only way to get the associated List of Data objects is by iterating over your JsonObject list and do a retrieve by association per JsonObject. From this Data Objects you can now do another retrieve by association (per Data Object) to get the List of JsonObject2s.

answered
0

Arjun,

I tried to recreate your situation, but when I put in the JSON above, I get an error because there

How did you get around that?

Mike

answered
0

I haven’t used this module, but noticed it the other day.  You may be able to use it to access your JSON data directly:

https://appstore.home.mendix.com/link/app/107685/

answered
0

You don’t need the ‘Root’ and ‘Data’ intermediate entities. Deselecting them in the import mapping would allow to generate a more simple structure.

Apart from that, there’s not much you do.

regards, Fabian

answered
0

Do you only need JsonObject_2? You can go into your mapping an unselect everything else and only get those objects in.

answered