1. Create a JSON structure
2. Create an export mapping, based on the JSON structure
3. Create microflow in which you create a file document and use the ExportToJson activity in this choose the mapping for export.
Hi Alamri Aziz,
I will share with you some examples of the Export mapping process. How to convert our Mendix objects into a JSON data format.
Step 1: I have created two entities with 1 to many associations. For each Category entity, we will have multiple Appliances objects.
Step 2: Create one Message_ Definitions to create the JSON template for Export mapping. By right-clicking on the module, Select the Add other option. You can see the Message definitions. In this section, we need to map objects what objects including attributes and Associations that need to be exported. Give any name for this Message definition. Like this
Step 3: Create one Export mapping by right-clicking on the module, You can see the Export mapping option inside Add other option.
Step 4: Double click on each entity to map the attributes that need to be exported. Like this
After the mapping process is done, finally it will look like this.
Step 5: Added the Export to JSON microflow call button in the data grid. Create one microflow with Export with mapping activity. Then we need to mention the input parameter and return variable.
Step 6: When clicking on the Category anyone of the object, it will generate the JSON data string with Category associated Appliances list.Like this
Final output :
I hope, it will help you.
Thanks and regards,