JSON object in GET response is each time different entity, can I use a generic JSON structure for it?

0
Hi guys,   I am consuming an API which responses each time with a different JSON structure; with different JSONobjects in it (43 entities); for example I receive below "entities"  a JSON object: "color". A next response could have other objects of the 43 entities (for instances length/weight/etc).   I am wondering whether I can set up a unique JSON structure without an associationName for each of the 43 entities?   { "msg_id": "0XuRcewouzHcIroA6", "_text": "Some text sentence of a descriptionline, from a description", "entities": { "color": [ { "confidence": 0.93332288255839, "value": "kleur", } ] } }  
asked
3 answers
0

Hi Enzo,

 

We use the Google JSON result and there we get also different address_components, so if you can get the hands on an JSON response with more entities and you add this as JSON structure in your Mendix app, Mendix will see that there are multiple objects in entities and probably will do the work for you.

 

Below some screenshots of how my google JSON response is imported:

 

answered
0

The details arealso considered as new JsonObjects. So i think it has to do with the delivered JSON structure. Seen I am not able to change that, need to find a work around to get the names of each object...any advice?

answered
0

Hi Enzo,

We ran into a similar problem a while ago.

To fix this issue we changed the JSON response (string) and then used this string as a parameter in the "Import from JSON" microflow action.

See the images below for some context:

http://imgur.com/a/69nMn

http://imgur.com/Lf2sLS7

answered