Guest User

split strings

a guest
Apr 9th, 2025
23
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JSON 11.43 KB | Source Code | 0 0
  1. {
  2.     "name": "split strings",
  3.     "flow": [
  4.         {
  5.             "id": 1,
  6.             "module": "util:SetVariables",
  7.             "version": 1,
  8.             "parameters": {},
  9.             "mapper": {
  10.                 "variables": [
  11.                     {
  12.                         "name": "String",
  13.                         "value": "This is part 1 of the string. This is part 2 of the string."
  14.                     }
  15.                 ],
  16.                 "scope": "roundtrip"
  17.             },
  18.             "metadata": {
  19.                 "designer": {
  20.                     "x": 0,
  21.                     "y": 0
  22.                 },
  23.                 "restore": {
  24.                     "expect": {
  25.                         "variables": {
  26.                             "items": [
  27.                                 null
  28.                             ]
  29.                         },
  30.                         "scope": {
  31.                             "label": "One cycle"
  32.                         }
  33.                     }
  34.                 },
  35.                 "expect": [
  36.                     {
  37.                         "name": "variables",
  38.                         "type": "array",
  39.                         "label": "Variables",
  40.                         "spec": [
  41.                             {
  42.                                 "name": "name",
  43.                                 "label": "Variable name",
  44.                                 "type": "text",
  45.                                 "required": true
  46.                             },
  47.                             {
  48.                                 "name": "value",
  49.                                 "label": "Variable value",
  50.                                 "type": "any"
  51.                             }
  52.                         ]
  53.                     },
  54.                     {
  55.                         "name": "scope",
  56.                         "type": "select",
  57.                         "label": "Variable lifetime",
  58.                         "required": true,
  59.                         "validate": {
  60.                             "enum": [
  61.                                 "roundtrip",
  62.                                 "execution"
  63.                             ]
  64.                         }
  65.                     }
  66.                 ],
  67.                 "interface": [
  68.                     {
  69.                         "name": "String",
  70.                         "label": "String",
  71.                         "type": "any"
  72.                     }
  73.                 ]
  74.             }
  75.         },
  76.         {
  77.             "id": 2,
  78.             "module": "util:SetVariables",
  79.             "version": 1,
  80.             "parameters": {},
  81.             "mapper": {
  82.                 "variables": [
  83.                     {
  84.                         "name": "Split String",
  85.                         "value": "{{split(1.String; \". \")}}"
  86.                     }
  87.                 ],
  88.                 "scope": "roundtrip"
  89.             },
  90.             "metadata": {
  91.                 "designer": {
  92.                     "x": 300,
  93.                     "y": 0
  94.                 },
  95.                 "restore": {
  96.                     "expect": {
  97.                         "variables": {
  98.                             "items": [
  99.                                 null
  100.                             ]
  101.                         },
  102.                         "scope": {
  103.                             "label": "One cycle"
  104.                         }
  105.                     }
  106.                 },
  107.                 "expect": [
  108.                     {
  109.                         "name": "variables",
  110.                         "type": "array",
  111.                         "label": "Variables",
  112.                         "spec": [
  113.                             {
  114.                                 "name": "name",
  115.                                 "label": "Variable name",
  116.                                 "type": "text",
  117.                                 "required": true
  118.                             },
  119.                             {
  120.                                 "name": "value",
  121.                                 "label": "Variable value",
  122.                                 "type": "any"
  123.                             }
  124.                         ]
  125.                     },
  126.                     {
  127.                         "name": "scope",
  128.                         "type": "select",
  129.                         "label": "Variable lifetime",
  130.                         "required": true,
  131.                         "validate": {
  132.                             "enum": [
  133.                                 "roundtrip",
  134.                                 "execution"
  135.                             ]
  136.                         }
  137.                     }
  138.                 ],
  139.                 "interface": [
  140.                     {
  141.                         "name": "Split String",
  142.                         "label": "Split String",
  143.                         "type": "any"
  144.                     }
  145.                 ]
  146.             }
  147.         },
  148.         {
  149.             "id": 3,
  150.             "module": "util:SetVariables",
  151.             "version": 1,
  152.             "parameters": {},
  153.             "mapper": {
  154.                 "variables": [
  155.                     {
  156.                         "name": "String 1",
  157.                         "value": "{{2.`Split String`[1]}}"
  158.                     },
  159.                     {
  160.                         "name": "String 2",
  161.                         "value": "{{2.`Split String`[2]}}"
  162.                     }
  163.                 ],
  164.                 "scope": "roundtrip"
  165.             },
  166.             "metadata": {
  167.                 "designer": {
  168.                     "x": 600,
  169.                     "y": 0
  170.                 },
  171.                 "restore": {
  172.                     "expect": {
  173.                         "variables": {
  174.                             "items": [
  175.                                 null,
  176.                                 null
  177.                             ]
  178.                         },
  179.                         "scope": {
  180.                             "label": "One cycle"
  181.                         }
  182.                     }
  183.                 },
  184.                 "expect": [
  185.                     {
  186.                         "name": "variables",
  187.                         "type": "array",
  188.                         "label": "Variables",
  189.                         "spec": [
  190.                             {
  191.                                 "name": "name",
  192.                                 "label": "Variable name",
  193.                                 "type": "text",
  194.                                 "required": true
  195.                             },
  196.                             {
  197.                                 "name": "value",
  198.                                 "label": "Variable value",
  199.                                 "type": "any"
  200.                             }
  201.                         ]
  202.                     },
  203.                     {
  204.                         "name": "scope",
  205.                         "type": "select",
  206.                         "label": "Variable lifetime",
  207.                         "required": true,
  208.                         "validate": {
  209.                             "enum": [
  210.                                 "roundtrip",
  211.                                 "execution"
  212.                             ]
  213.                         }
  214.                     }
  215.                 ],
  216.                 "interface": [
  217.                     {
  218.                         "name": "String 1",
  219.                         "label": "String 1",
  220.                         "type": "any"
  221.                     },
  222.                     {
  223.                         "name": "String 2",
  224.                         "label": "String 2",
  225.                         "type": "any"
  226.                     }
  227.                 ]
  228.             }
  229.         },
  230.         {
  231.             "id": 4,
  232.             "module": "builtin:BasicFeeder",
  233.             "version": 1,
  234.             "parameters": {},
  235.             "mapper": {
  236.                 "array": "{{2.`Split String`}}"
  237.             },
  238.             "metadata": {
  239.                 "designer": {
  240.                     "x": 900,
  241.                     "y": 0
  242.                 },
  243.                 "restore": {
  244.                     "expect": {
  245.                         "array": {
  246.                             "mode": "edit"
  247.                         }
  248.                     }
  249.                 },
  250.                 "expect": [
  251.                     {
  252.                         "name": "array",
  253.                         "type": "array",
  254.                         "label": "Array",
  255.                         "mode": "edit",
  256.                         "spec": []
  257.                     }
  258.                 ]
  259.             }
  260.         },
  261.         {
  262.             "id": 5,
  263.             "module": "util:SetVariables",
  264.             "version": 1,
  265.             "parameters": {},
  266.             "mapper": {
  267.                 "variables": [
  268.                     {
  269.                         "name": "Current String",
  270.                         "value": "{{4.value}}"
  271.                     }
  272.                 ],
  273.                 "scope": "roundtrip"
  274.             },
  275.             "metadata": {
  276.                 "designer": {
  277.                     "x": 1200,
  278.                     "y": 0
  279.                 },
  280.                 "restore": {
  281.                     "expect": {
  282.                         "variables": {
  283.                             "items": [
  284.                                 null
  285.                             ]
  286.                         },
  287.                         "scope": {
  288.                             "label": "One cycle"
  289.                         }
  290.                     }
  291.                 },
  292.                 "expect": [
  293.                     {
  294.                         "name": "variables",
  295.                         "type": "array",
  296.                         "label": "Variables",
  297.                         "spec": [
  298.                             {
  299.                                 "name": "name",
  300.                                 "label": "Variable name",
  301.                                 "type": "text",
  302.                                 "required": true
  303.                             },
  304.                             {
  305.                                 "name": "value",
  306.                                 "label": "Variable value",
  307.                                 "type": "any"
  308.                             }
  309.                         ]
  310.                     },
  311.                     {
  312.                         "name": "scope",
  313.                         "type": "select",
  314.                         "label": "Variable lifetime",
  315.                         "required": true,
  316.                         "validate": {
  317.                             "enum": [
  318.                                 "roundtrip",
  319.                                 "execution"
  320.                             ]
  321.                         }
  322.                     }
  323.                 ],
  324.                 "interface": [
  325.                     {
  326.                         "name": "Current String",
  327.                         "label": "Current String",
  328.                         "type": "any"
  329.                     }
  330.                 ]
  331.             }
  332.         }
  333.     ],
  334.     "metadata": {
  335.         "instant": false,
  336.         "version": 1,
  337.         "scenario": {
  338.             "roundtrips": 1,
  339.             "maxErrors": 3,
  340.             "autoCommit": true,
  341.             "autoCommitTriggerLast": true,
  342.             "sequential": false,
  343.             "slots": null,
  344.             "confidential": false,
  345.             "dataloss": false,
  346.             "dlq": false,
  347.             "freshVariables": false
  348.         },
  349.         "designer": {
  350.             "orphans": []
  351.         },
  352.         "zone": "us1.make.com",
  353.         "notes": []
  354.     }
  355. }
Add Comment
Please, Sign In to add comment