Skip to content

Commit

Permalink
Apply suggestions from code review #282
Browse files Browse the repository at this point in the history
Review by @blackwinter
  • Loading branch information
TobiasNx authored Oct 14, 2024
1 parent 8ad9cde commit 93ee08e
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -269,16 +269,15 @@ put_vars(

##### `to_var`

Defines a single global variable that can be referenced with `$[<variableName>]` and assinges the value of the `<sourceField>`.
Defines a single global variable that can be referenced with `$[<variableName>]` and assigns the value of the `<sourceField>`.

```perl
to_var("<sourceField>", "<variableValue>")
to_var("<sourceField>", "<variableName>")
```

Options:

- `"default"`: provide default value if source field does not exist.

- `default`: Default value if source field does not exist. The option needs to be written in quotation marks because it is a reserved word in Java. (Default: Empty string)

[Example in Playground](https://metafacture.org/playground/?example=to_var)

Expand Down

0 comments on commit 93ee08e

Please sign in to comment.