Transform JSON String to list

0
I have an object with a typical json structure in it: {"value1": 5, "value2": "test", "value3": 55} {"value1": 2, "value2": "test2", "value3": 5} .… how can i transform this to a list with “value1”, “value2”,… as colum names
asked
1 answers
0

Hey Sophia,

 

In order to achieve this you’ll need to create an object to transform this data into. Mendix is different from a front-end json based language. It’s the real deal, the full stack! So there isn’t some widget out-of-the-box that will let you input your json and render it into a list on the page.

Instead you’ll have to implement something like an integration layer, which will require a JSON structure, import mapping, and microflow to execute.

The result of this integration layer will be a list of objects that you can then render onto the page using a view widget. That can be a list view or a data grid or a data grid 2. At that point you will have rendered the data inside your JSON onto the page for the user.

Some good academy courses for learning more about this process of working with data can be found here:
Section 5 of the Importing and Exporting learning path: Import Products

If you want to skip right to what you’re looking to do you can use the above link, but it might be best to start from the very beginning of the learning path.

Hope this helps!
Austin

answered