{
  "algorithm": {
    "parameters": [
      {
        "name": "mainPath",
        "type": "string"
      }
    ],
    "statements": [
      {
        "command": "Set",
        "expression": "{ paths: [] }",
        "variableName": "breadcrumb"
      },
      {
        "command": "Set",
        "expression": "Split(^mainPath, \"/\")",
        "variableName": "paths"
      },
      {
        "children": [
          {
            "children": [
              {
                "command": "Set",
                "expression": "Split(^path, \"|\")",
                "variableName": "data"
              },
              {
                "command": "Push",
                "expressionItem": "{key: ^data[1], value: ^data[0]}",
                "variableNameList": "breadcrumb.paths"
              }
            ],
            "command": "If",
            "expression": "!IsNullOrWhiteSpace(^path)"
          }
        ],
        "command": "ForEach",
        "expressionList": "^paths",
        "variableNameItem": "path"
      },
      {
        "command": "Return",
        "expression": "^breadcrumb"
      }
    ],
    "typeReturn": "any",
    "variables": [
      {
        "name": "breadcrumb",
        "type": "any"
      },
      {
        "name": "path",
        "type": "string"
      },
      {
        "name": "paths",
        "type": "list(string)"
      },
      {
        "name": "data",
        "type": "list(string)"
      }
    ]
  },
  "routing": {
    "method": "GET",
    "parameters": [
      {
        "bind": "mainPath",
        "in": "Body",
        "name": "mainPath",
        "remarks": "Path"
      }
    ],
    "path": "/ps-sales-teams/breadcrumb",
    "remarks": "Get Sales Team Path Breadcrumb"
  }
}