Articles in this section

pathcase helper

Converts a string into pathcase by replacing spaces, dashes, underscores, and other non-word characters with forward slashes (/). Use it when you need to format identifiers or labels as path-like values.

Usage

{{pathcase value}}
  • value (required): input string to convert

Examples

  1. Convert a mixed string into pathcase

    {{pathcase record.input}}
    

    Input:

    {
      "record": {
        "input": "a-b-c d_e"
      }
    }
    

    Output:

    a/b/c/d/e
    
  2. Split camel/pathcase

    {{pathcase record.name}}

    Input

    { "record": { "name": "getUserProfile" } }

    Output

    get/user/profile

Tip

  • All separators (spaces, dashes, underscores, symbols) are normalized to /.

  • Lowercasses all segments with digits preserved (e.g. v2, v1)

  • Useful for generating folder-like paths, URL fragments, or grouping keys.

  • Consecutive non-word characters are collapsed into a single slash.

  • Non-string datatype inputs (like numbers or boolean) are converted to strings before processing. Arrays of primitive types (like strings or numbers) are converted into a comma-separated string before processing. If inputs are objects or object arrays, the output will be unusable.