{
    "name": "Inline Functions",
    "flow": [
        {
            "id": 2,
            "module": "json:ParseJSON",
            "version": 1,
            "parameters": {
                "type": ""
            },
            "mapper": {
                "json": "[{\n  \"clients\": [\n    {\n      \"name\": \"John Doe\",\n      \"email\": \"john.doe@example.com\",\n      \"age\": 40,\n      \"tags\": [\"tag1\", \"tag2\", \"tag3\"],\n      \"tags\": [\"tag1\", \"tag2\", \"tag3\"],\n      \"address\": {\n        \"street\": \"123 Main St\",\n        \"city\": \"Anytown\",\n        \"zipcode\": \"12345\"\n      },\n      \"hobbies\": [\n        {\n          \"name\": \"reading\",\n          \"frequency\": \"daily\"\n        },\n        {\n          \"name\": \"biking\",\n          \"frequency\": \"weekly\"\n        },\n        {\n          \"name\": \"skating\",\n          \"frequency\": \"monthly\"\n        }\n      ]\n    },\n    {\n      \"name\": \"Jane Smith\",\n      \"email\": \"jane.smith@example.com\",\n      \"age\": 32,\n      \"address\": {\n        \"street\": \"456 Elm St\",\n        \"city\": \"Othertown\",\n        \"zipcode\": \"67890\"\n      },\n      \"hobbies\": [\n        {\n          \"name\": \"painting\",\n          \"frequency\": \"weekly\"\n        },\n        {\n          \"name\": \"yoga\",\n          \"frequency\": \"daily\"\n        },\n        {\n          \"name\": \"hiking\",\n          \"frequency\": \"monthly\"\n        }\n      ]\n    },\n    {\n      \"name\": \"Bob Johnson\",\n      \"email\": \"bob.johnson@example.com\",\n      \"age\": 29,\n      \"tags\": [\"tag1\", \"tag2\", \"tag3\"],\n      \"address\": {\n        \"street\": \"789 Oak St\",\n        \"city\": \"Elsewhere\",\n        \"zipcode\": \"54321\"\n      },\n      \"hobbies\": [\n        {\n          \"name\": \"gaming\",\n          \"frequency\": \"daily\"\n        },\n        {\n          \"name\": \"cooking\",\n          \"frequency\": \"weekly\"\n        },\n        {\n          \"name\": \"traveling\",\n          \"frequency\": \"annually\"\n        }\n      ]\n    },\n    {\n      \"name\": \"Alice Brown\",\n      \"email\": \"alice.brown@example.com\",\n      \"age\": 35,\n      \"tags\": [\"tag1\", \"tag2\", \"tag3\"],\n      \"address\": {\n        \"street\": \"101 Maple St\",\n        \"city\": \"Sometown\",\n        \"zipcode\": \"98765\"\n      },\n      \"hobbies\": [\n        {\n          \"name\": \"photography\",\n          \"frequency\": \"weekly\"\n        },\n        {\n          \"name\": \"dancing\",\n          \"frequency\": \"monthly\"\n        },\n        {\n          \"name\": \"swimming\",\n          \"frequency\": \"weekly\"\n        }\n      ]\n    },\n    {\n      \"name\": \"Jane Smith\",\n      \"email\": \"jane.smith@example.com\",\n      \"age\": 32,\n      \"tags\": [\"tag1\", \"tag2\", \"tag3\"],\n      \"address\": {\n        \"street\": \"456 Elm St\",\n        \"city\": \"Othertown\",\n        \"zipcode\": \"67890\"\n      },\n      \"hobbies\": [\n        {\n          \"name\": \"painting\",\n          \"frequency\": \"weekly\"\n        },\n        {\n          \"name\": \"yoga\",\n          \"frequency\": \"daily\"\n        },\n        {\n          \"name\": \"hiking\",\n          \"frequency\": \"monthly\"\n        }\n      ]\n    }\n  ]\n}]"
            },
            "metadata": {
                "designer": {
                    "x": 0,
                    "y": 0
                },
                "restore": {
                    "parameters": {
                        "type": {
                            "label": "Choose a data structure"
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "type",
                        "type": "udt",
                        "label": "Data structure"
                    }
                ],
                "expect": [
                    {
                        "name": "json",
                        "type": "text",
                        "label": "JSON string",
                        "required": true
                    }
                ]
            }
        },
        {
            "id": 3,
            "module": "json:CreateJSON",
            "version": 1,
            "parameters": {
                "type": 166328,
                "space": ""
            },
            "mapper": {
                "Array": [
                    "1",
                    "2",
                    "3",
                    "4",
                    "5"
                ]
            },
            "metadata": {
                "designer": {
                    "x": 300,
                    "y": 0
                },
                "restore": {
                    "expect": {
                        "Array": {
                            "mode": "chose",
                            "items": [
                                null,
                                null,
                                null,
                                null,
                                null
                            ]
                        }
                    },
                    "parameters": {
                        "type": {
                            "label": "My data structure"
                        },
                        "space": {
                            "label": "Empty"
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "type",
                        "type": "udt",
                        "label": "Data structure",
                        "required": true
                    },
                    {
                        "name": "space",
                        "type": "select",
                        "label": "Indentation",
                        "validate": {
                            "enum": [
                                "tab",
                                "2",
                                "4"
                            ]
                        }
                    }
                ],
                "expect": [
                    {
                        "name": "Array",
                        "spec": {
                            "name": "value",
                            "type": "number"
                        },
                        "type": "array",
                        "label": null
                    }
                ]
            }
        },
        {
            "id": 4,
            "module": "json:ParseJSON",
            "version": 1,
            "parameters": {
                "type": ""
            },
            "mapper": {
                "json": "{{3.json}}"
            },
            "metadata": {
                "designer": {
                    "x": 600,
                    "y": 0
                },
                "restore": {
                    "parameters": {
                        "type": {
                            "label": "Choose a data structure"
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "type",
                        "type": "udt",
                        "label": "Data structure"
                    }
                ],
                "expect": [
                    {
                        "name": "json",
                        "type": "text",
                        "label": "JSON string",
                        "required": true
                    }
                ]
            }
        },
        {
            "id": 1,
            "module": "util:SetVariables",
            "version": 1,
            "parameters": {},
            "mapper": {
                "variables": [
                    {
                        "name": "Ceil",
                        "value": "{{ceil(1.2)}}"
                    },
                    {
                        "name": "Floor",
                        "value": "{{floor(1.9)}}"
                    },
                    {
                        "name": "Max Value",
                        "value": "{{max(4.Array)}}"
                    },
                    {
                        "name": "Min Value",
                        "value": "{{min(4.Array)}}"
                    },
                    {
                        "name": "Round",
                        "value": "{{round(1.4123123 * 10) / 10}}"
                    },
                    {
                        "name": "SUM",
                        "value": "{{sum(4.Array)}}"
                    },
                    {
                        "name": "Average",
                        "value": "{{average(4.Array)}}"
                    },
                    {
                        "name": "Parse Number",
                        "value": "{{parseNumber(\"212312,32\"; \",\")}}"
                    },
                    {
                        "name": "Format Number",
                        "value": "{{formatNumber(1000; 2; \".\"; \",\")}}"
                    },
                    {
                        "name": "Perform Math",
                        "value": "{{2 * 10 / 4 + 20 - 3}}"
                    },
                    {
                        "name": "Module",
                        "value": "{{25 % 7}}"
                    },
                    {
                        "name": "PI",
                        "value": "{{pi}}"
                    },
                    {
                        "name": "Random",
                        "value": "{{random}}"
                    },
                    {
                        "name": "IF STATEMENT",
                        "value": "{{if(0 >= 1; \"A\"; if(2 >= 1; \"B\"; \"C\"))}}"
                    },
                    {
                        "name": "IF EMPTY",
                        "value": "{{ifempty(emptystring; \"B\")}}"
                    },
                    {
                        "name": "Switch",
                        "value": "{{switch(32; 30; \"thirty\"; 31; \"thirty one\"; 32; \"thirty two\")}}"
                    },
                    {
                        "name": "Omit",
                        "value": "{{omit(2.clients[].address; \"street\")}}"
                    },
                    {
                        "name": "Pick",
                        "value": "{{pick(2.clients[].address; \"street\")}}"
                    },
                    {
                        "name": "GET",
                        "value": "{{get(2.clients; \"2.address.street\")}}"
                    },
                    {
                        "name": "Math",
                        "value": "{{(1 + 10) / 2}}"
                    },
                    {
                        "name": "Operators",
                        "value": "{{if(contains(\"Hello world\"; \"world\") = \"true\"; \"A\"; \"B\")}}"
                    },
                    {
                        "name": "Length",
                        "value": "{{length(\"Jono Catliff\")}}"
                    },
                    {
                        "name": "Different cases",
                        "value": "{{lower(\"Jono Catliff\")}}\n{{capitalize(\"Jono catliff\")}}\n{{startcase(\"Jono catliff\")}}\n{{upper(\"Jono Catliff\")}}"
                    },
                    {
                        "name": "ASCII",
                        "value": "{{ascii(\"café\"; true)}}"
                    },
                    {
                        "name": "Replace",
                        "value": "{{replace(\"Jono Catliff\"; \"Jono\"; \"Jonathan\")}}"
                    },
                    {
                        "name": "Trim",
                        "value": "{{trim(\"      hello world       \")}}"
                    },
                    {
                        "name": "Substring",
                        "value": "{{substring(\"Hello\"; 0; 3)}}"
                    },
                    {
                        "name": "Index Of",
                        "value": "{{indexOf(\"Internet\"; \"ternet\")}}"
                    },
                    {
                        "name": "to String",
                        "value": "{{toString(true)}}"
                    },
                    {
                        "name": "Encode URL",
                        "value": "{{encodeURL(\"this is a string of test\")}}"
                    },
                    {
                        "name": "Decode a URL",
                        "value": "{{decodeURL(\"this%20is%20a%20string%20of%20test\")}}"
                    },
                    {
                        "name": "HTML/Markdown",
                        "value": "{{escapeHTML(\"<h1>Hello world</h1>\")}}\n{{escapeMarkdown(\"## This is a heading\")}}\n{{stripHTML(\"<li>Hello world</li>\")}}"
                    },
                    {
                        "name": "Contains",
                        "value": "{{contains(3.json; 2)}}"
                    },
                    {
                        "name": "Split",
                        "value": "{{split(\"Jono Catliff\"; space)}}"
                    },
                    {
                        "name": "UUID",
                        "value": "{{uuid}}"
                    },
                    {
                        "name": "Codes",
                        "value": "{{toBinary(\"test\")}}\n{{md5(\"test\")}}\n{{sha1(\"test\")}}\n{{sha256(\"test\")}}\n{{sha512(\"test\")}}\n{{base64(\"test\")}}"
                    },
                    {
                        "name": "Date Picker",
                        "value": "2024-08-23 9:57 AM"
                    },
                    {
                        "name": "Time Stamp",
                        "value": "{{timestamp}}"
                    },
                    {
                        "name": "Now",
                        "value": "{{now}}"
                    },
                    {
                        "name": "Add Time/Subtract Time",
                        "value": "{{addSeconds(now; 32)}}\n{{addMinutes(; 7)}}\n{{addHours(now; -6)}}\n{{addDays(now; -2)}}\n{{addMonths(now; 14)}}\n{{addYears(now; -1)}}"
                    },
                    {
                        "name": "Compare Dates",
                        "value": "{{round((addMinutes(now; 32) - now) / 1000 / 60)}}"
                    },
                    {
                        "name": "Setting Time",
                        "value": "{{setSecond(now; 13)}}\n{{setMinute(now; 9)}}\n{{setHour(now; 4)}}\n{{setDay(now; \"tuesday\")}}\n{{setDate(now; 34)}}\n{{setMonth(now; 13)}}\n{{setYear(now; -2)}}"
                    },
                    {
                        "name": "Format Date",
                        "value": "{{formatDate(now; \"DD MMM YYYY\")}}"
                    },
                    {
                        "name": "Parse Dates",
                        "value": "{{parseDate(\"2016-08-01\"; \"YYYY-MM-DD\")}}"
                    },
                    {
                        "name": "Change a parsed date",
                        "value": "{{addHours(parseDate(\"2016-08-01\"; \"YYYY-MM-DD\"); 3)}}"
                    },
                    {
                        "name": "Join",
                        "value": "{{join(2.clients[].tags; )}}"
                    },
                    {
                        "name": "Array_Length",
                        "value": "{{length(2.clients[].tags)}}"
                    },
                    {
                        "name": "Array_Keys",
                        "value": "{{keys(2.clients[].address)}}"
                    },
                    {
                        "name": "Array_Slice",
                        "value": "{{slice(4.Array; 1; 3)}}"
                    },
                    {
                        "name": "Merge Arrays Together",
                        "value": "{{merge(4.Array; 2.clients[].tags)}}"
                    },
                    {
                        "name": "Array_Contain",
                        "value": "{{contains(4.Array; 2)}}"
                    },
                    {
                        "name": "Array_Remove",
                        "value": "{{remove(4.Array; 2; 3; 4)}}"
                    },
                    {
                        "name": "Array_Add",
                        "value": "{{add(4.Array; 6; 7; 8; 9)}}"
                    },
                    {
                        "name": "Array_Map",
                        "value": "{{map(2.clients; \"tags\"; \"name\"; \"John Doe\")}}"
                    },
                    {
                        "name": "Shuffle",
                        "value": "{{shuffle(2.clients)}}"
                    },
                    {
                        "name": "Array_Sort",
                        "value": "{{sort(2.clients; \"name\")}}"
                    },
                    {
                        "name": "Reverse",
                        "value": "{{reverse(sort(2.clients; \"name\"))}}"
                    },
                    {
                        "name": "Array_first",
                        "value": "{{first(4.Array)}}"
                    },
                    {
                        "name": "Array_Last",
                        "value": "{{last(4.Array)}}"
                    },
                    {
                        "name": "Flatten",
                        "value": "{{flatten(2.clients[].hobbies)}}"
                    },
                    {
                        "name": "To_Array",
                        "value": "{{toArray(2.clients[].address)}}"
                    },
                    {
                        "name": "Empty_Array",
                        "value": "{{add(emptyarray; 1; 2; 3; 4; 5)}}"
                    },
                    {
                        "name": "Custom & System Variable",
                        "value": "Data consumed: {{var.scenario.dataConsumed}}\nExecution ID: {{var.scenario.executionId}}\nExecution stated at: {{var.scenario.executionStartedAt}}\nExcecution type: {{var.scenario.executionType}}\nExecution URL: {{var.scenario.executionUrl}}\nScenario ID: {{var.scenario.id}}\nIs incomplete execution: {{var.scenario.isDLQExecution}}\nScenario Name: {{var.scenario.name}}\nOperations consumed: {{var.scenario.operationsConsumed}}\nScenario URL: {{var.scenario.url}}\nTeam ID: {{var.team.id}}\nTeam Name: {{var.team.name}}\nData left: {{var.organization.dataLeft}}\nOrganization ID: {{var.organization.id}}\nOrganization name: {{var.organization.name}}\nOperations left: {{var.organization.operationsLeft}}\nZone domain: {{var.organization.zoneDomain}}"
                    }
                ],
                "scope": "roundtrip"
            },
            "metadata": {
                "designer": {
                    "x": 900,
                    "y": 0
                },
                "restore": {
                    "expect": {
                        "variables": {
                            "items": [
                                null,
                                null,
                                null,
                                null,
                                null,
                                null,
                                null,
                                null,
                                null,
                                null,
                                null,
                                null,
                                null,
                                null,
                                null,
                                null,
                                null,
                                null,
                                null,
                                null,
                                null,
                                null,
                                null,
                                null,
                                null,
                                null,
                                null,
                                null,
                                null,
                                null,
                                null,
                                null,
                                null,
                                null,
                                null,
                                null,
                                null,
                                null,
                                null,
                                null,
                                null,
                                null,
                                null,
                                null,
                                null,
                                null,
                                null,
                                null,
                                null,
                                null,
                                null,
                                null,
                                null,
                                null,
                                null,
                                null,
                                null,
                                null,
                                null,
                                null,
                                null,
                                null,
                                null
                            ]
                        },
                        "scope": {
                            "label": "One cycle"
                        }
                    }
                },
                "expect": [
                    {
                        "name": "variables",
                        "type": "array",
                        "label": "Variables",
                        "spec": [
                            {
                                "name": "name",
                                "label": "Variable name",
                                "type": "text",
                                "required": true
                            },
                            {
                                "name": "value",
                                "label": "Variable value",
                                "type": "any"
                            }
                        ]
                    },
                    {
                        "name": "scope",
                        "type": "select",
                        "label": "Variable lifetime",
                        "required": true,
                        "validate": {
                            "enum": [
                                "roundtrip",
                                "execution"
                            ]
                        }
                    }
                ],
                "interface": [
                    {
                        "name": "Ceil",
                        "label": "Ceil",
                        "type": "any"
                    },
                    {
                        "name": "Floor",
                        "label": "Floor",
                        "type": "any"
                    },
                    {
                        "name": "Max Value",
                        "label": "Max Value",
                        "type": "any"
                    },
                    {
                        "name": "Min Value",
                        "label": "Min Value",
                        "type": "any"
                    },
                    {
                        "name": "Round",
                        "label": "Round",
                        "type": "any"
                    },
                    {
                        "name": "SUM",
                        "label": "SUM",
                        "type": "any"
                    },
                    {
                        "name": "Average",
                        "label": "Average",
                        "type": "any"
                    },
                    {
                        "name": "Parse Number",
                        "label": "Parse Number",
                        "type": "any"
                    },
                    {
                        "name": "Format Number",
                        "label": "Format Number",
                        "type": "any"
                    },
                    {
                        "name": "Perform Math",
                        "label": "Perform Math",
                        "type": "any"
                    },
                    {
                        "name": "Module",
                        "label": "Module",
                        "type": "any"
                    },
                    {
                        "name": "PI",
                        "label": "PI",
                        "type": "any"
                    },
                    {
                        "name": "Random",
                        "label": "Random",
                        "type": "any"
                    },
                    {
                        "name": "IF STATEMENT",
                        "label": "IF STATEMENT",
                        "type": "any"
                    },
                    {
                        "name": "IF EMPTY",
                        "label": "IF EMPTY",
                        "type": "any"
                    },
                    {
                        "name": "Switch",
                        "label": "Switch",
                        "type": "any"
                    },
                    {
                        "name": "Omit",
                        "label": "Omit",
                        "type": "any"
                    },
                    {
                        "name": "Pick",
                        "label": "Pick",
                        "type": "any"
                    },
                    {
                        "name": "GET",
                        "label": "GET",
                        "type": "any"
                    },
                    {
                        "name": "Math",
                        "label": "Math",
                        "type": "any"
                    },
                    {
                        "name": "Operators",
                        "label": "Operators",
                        "type": "any"
                    },
                    {
                        "name": "Length",
                        "label": "Length",
                        "type": "any"
                    },
                    {
                        "name": "Different cases",
                        "label": "Different cases",
                        "type": "any"
                    },
                    {
                        "name": "ASCII",
                        "label": "ASCII",
                        "type": "any"
                    },
                    {
                        "name": "Replace",
                        "label": "Replace",
                        "type": "any"
                    },
                    {
                        "name": "Trim",
                        "label": "Trim",
                        "type": "any"
                    },
                    {
                        "name": "Substring",
                        "label": "Substring",
                        "type": "any"
                    },
                    {
                        "name": "Index Of",
                        "label": "Index Of",
                        "type": "any"
                    },
                    {
                        "name": "to String",
                        "label": "to String",
                        "type": "any"
                    },
                    {
                        "name": "Encode URL",
                        "label": "Encode URL",
                        "type": "any"
                    },
                    {
                        "name": "Decode a URL",
                        "label": "Decode a URL",
                        "type": "any"
                    },
                    {
                        "name": "HTML/Markdown",
                        "label": "HTML/Markdown",
                        "type": "any"
                    },
                    {
                        "name": "Contains",
                        "label": "Contains",
                        "type": "any"
                    },
                    {
                        "name": "Split",
                        "label": "Split",
                        "type": "any"
                    },
                    {
                        "name": "UUID",
                        "label": "UUID",
                        "type": "any"
                    },
                    {
                        "name": "Codes",
                        "label": "Codes",
                        "type": "any"
                    },
                    {
                        "name": "Date Picker",
                        "label": "Date Picker",
                        "type": "any"
                    },
                    {
                        "name": "Time Stamp",
                        "label": "Time Stamp",
                        "type": "any"
                    },
                    {
                        "name": "Now",
                        "label": "Now",
                        "type": "any"
                    },
                    {
                        "name": "Add Time/Subtract Time",
                        "label": "Add Time/Subtract Time",
                        "type": "any"
                    },
                    {
                        "name": "Compare Dates",
                        "label": "Compare Dates",
                        "type": "any"
                    },
                    {
                        "name": "Setting Time",
                        "label": "Setting Time",
                        "type": "any"
                    },
                    {
                        "name": "Format Date",
                        "label": "Format Date",
                        "type": "any"
                    },
                    {
                        "name": "Parse Dates",
                        "label": "Parse Dates",
                        "type": "any"
                    },
                    {
                        "name": "Change a parsed date",
                        "label": "Change a parsed date",
                        "type": "any"
                    },
                    {
                        "name": "Join",
                        "label": "Join",
                        "type": "any"
                    },
                    {
                        "name": "Array_Length",
                        "label": "Array_Length",
                        "type": "any"
                    },
                    {
                        "name": "Array_Keys",
                        "label": "Array_Keys",
                        "type": "any"
                    },
                    {
                        "name": "Array_Slice",
                        "label": "Array_Slice",
                        "type": "any"
                    },
                    {
                        "name": "Merge Arrays Together",
                        "label": "Merge Arrays Together",
                        "type": "any"
                    },
                    {
                        "name": "Array_Contain",
                        "label": "Array_Contain",
                        "type": "any"
                    },
                    {
                        "name": "Array_Remove",
                        "label": "Array_Remove",
                        "type": "any"
                    },
                    {
                        "name": "Array_Add",
                        "label": "Array_Add",
                        "type": "any"
                    },
                    {
                        "name": "Array_Map",
                        "label": "Array_Map",
                        "type": "any"
                    },
                    {
                        "name": "Shuffle",
                        "label": "Shuffle",
                        "type": "any"
                    },
                    {
                        "name": "Array_Sort",
                        "label": "Array_Sort",
                        "type": "any"
                    },
                    {
                        "name": "Reverse",
                        "label": "Reverse",
                        "type": "any"
                    },
                    {
                        "name": "Array_first",
                        "label": "Array_first",
                        "type": "any"
                    },
                    {
                        "name": "Array_Last",
                        "label": "Array_Last",
                        "type": "any"
                    },
                    {
                        "name": "Flatten",
                        "label": "Flatten",
                        "type": "any"
                    },
                    {
                        "name": "To_Array",
                        "label": "To_Array",
                        "type": "any"
                    },
                    {
                        "name": "Empty_Array",
                        "label": "Empty_Array",
                        "type": "any"
                    },
                    {
                        "name": "Custom & System Variable",
                        "label": "Custom & System Variable",
                        "type": "any"
                    }
                ]
            }
        }
    ],
    "metadata": {
        "instant": false,
        "version": 1,
        "scenario": {
            "roundtrips": 1,
            "maxErrors": 3,
            "autoCommit": true,
            "autoCommitTriggerLast": true,
            "sequential": false,
            "slots": null,
            "confidential": false,
            "dataloss": false,
            "dlq": false,
            "freshVariables": false
        },
        "designer": {
            "orphans": []
        },
        "zone": "us1.make.com"
    }
}