Skip to content

Commit 7d35b55

Browse files
Adding the example of usage of -p,--parameter <param-name param-value> (#55)
* Adding the example of usage of -p,--parameter <param-name param-value> This is a port of the PR #54 as the commit * Update README.md Incorporated changes as suggested by @afelisatti Co-authored-by: Julian Miras Hernandez <julian.miras@mulesoft.com>
1 parent e23888b commit 7d35b55

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,19 @@ curl https://jsonplaceholder.typicode.com/posts/1 | dw "output application/json
287287
}
288288
```
289289
290+
### Using parameters
291+
Using the internal map `params`, we can access injected parameters in the command line with the `-p` option
292+
```
293+
dw -p myName Julian "output json --- { name : params.myName }"
294+
```
295+
#### Output
296+
```
297+
{
298+
"name": "Julian"
299+
}
300+
```
301+
302+
290303
## Contributions Welcome
291304
292305
Contributions to this project can be made through Pull Requests and Issues on the

0 commit comments

Comments
 (0)