Do you know a solid way to Create JSON?

Hi @onurbolaca,

There is an alternative way to do it via datastructure, but I need to check whether how Create a JSON module handles empty collection.

What you can do is,

Create a DataStructure like this,


{
    "ColumnstoChange": [
        {
            "columnId": "status2",
            "columnValue": "{{49.`8`}}",
            "columnValueTypeDateTime": {
                "date": "{{49.`80`}}",
                "includeTime": false
            },"columnValueTypeCheckbox": {
                "checked": "{{if(74.`Sonderanalyse erfolgt?` = 0; null; true)}}"
            }
        }]

and, so forth for others as well if there are other variants to columnValue. After JSON is created, you then need to use replace to replace,

columnValueTypeDateTime, columnValueTypeCheckbox to columnValue.

I need to test this out as per my previous experience with Make Data Structure, it will return null values if the fields are not set inside the collection. You should be able to use ignore for such cases, but need to review how Make reformat that as well.

2 Likes