Creating an Entity from a dynamic JSON structure

0
Hello all,    I’m looking to create an Entity from a JSON structure that is not known beforehand, therefore it cannot be used in the Mendix ‘JSON Structure’ and I cannot implement a mapping without such JSON structure.    My use case is the following: I’ll receive a JSON String that looks like:  { “personal_details” : [“name”, “age”, “email”] } and in this case I want my Entity Personal Details to have the attributes Name, Age and Email. But next time, my JSON string can look like: { “personal_details” : [“name”, “age”, “date_of_birth”, “address”, “phone_number”] } and in this case my attributs would be different.    In some cases, my JSON Structure can even contain in the list of attributes other element that should also be interpreted as Entities on their own.    So, my question is: is there a way of creating Entities from JSON strings that are given as an input, and not known beforehand?    Thanks for  your help!    
asked
2 answers
0

To My Knowledge it is not possible. 
but you can give a try using  Typescript.  

answered
0

Are these always variations on the same structure, but with certain attributes missing? If they are, use the most complete version of the JSON structure so you have all possible attributes in your Input Mapping and it should work.

Good luck!

answered