{
  "version": "3.15",
  "name": "Test08: Nested Loop with Branch",
  "registry": {
    "params": [],
    "vars": ["$numbers([OBJECT])", "$categories([STRING])"]
  },
  "steps": [
    {
      "id": "Set_Numbers",
      "target": "$numbers",
      "value": "[{\"val\": 10}, {\"val\": 55}, {\"val\": 90}, {\"val\": 30}, {\"val\": 75}]",
      "next": "Loop_Classify"
    },
    {
      "id": "Loop_Classify",
      "mode": "serial",
      "source": "=$numbers",
      "children": ["Branch_Level"],
      "next": "Stop_End"
    },
    {
      "id": "Branch_Level",
      "cases": [
        ["=_item.val >= 80", "Set_High"],
        ["=_item.val >= 50", "Set_Medium"],
        ["ELSE", "Set_Low"]
      ],
      "next": "RETURN"
    },
    { "id": "Set_High",   "target": "$categories[_index]", "value": "=\"high(\"   + _item.val + \")\"", "next": "RETURN" },
    { "id": "Set_Medium", "target": "$categories[_index]", "value": "=\"medium(\" + _item.val + \")\"", "next": "RETURN" },
    { "id": "Set_Low",    "target": "$categories[_index]", "value": "=\"low(\"    + _item.val + \")\"", "next": "RETURN" },
    { "id": "Stop_End" }
  ]
}
