Skip to content

Commit

Permalink
Fix getGlobalVar helper docs
Browse files Browse the repository at this point in the history
  • Loading branch information
255kb committed Nov 19, 2024
1 parent b00910c commit 0ba2a20
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions content/docs/latest/templating/mockoon-variables-helpers.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ Get a global variable's value set with [`setGlobalVar`](#setglobalvar). Global v
| ------------------- | ------ | -------------------------- |
| 0 | string | Variable name |
| 1 | string | Path to the value property |
| 2 | string | Default value |

**Examples**

Expand All @@ -127,6 +128,12 @@ Get a global variable's value set with [`setGlobalVar`](#setglobalvar). Global v
<!-- Stringify the variable content -->
{{{stringify (getGlobalVar 'varName')}}}
<!-- Get the variable content at the path or the default value -->
{{getGlobalVar 'varName' 'path.to.property' 'default value'}}
<!-- Get the variable content (without path)) or the default value -->
{{getGlobalVar 'varName' null 'default value'}}
```

## getEnvVar
Expand Down

0 comments on commit 0ba2a20

Please sign in to comment.