Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 11 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,22 @@ Some uses might be to

I could only publish this update by changing the task ID, which has the unfortunate side-effect of messing up the installation for those who had it previously installed. I've sent a query into the Marketplace team to see why this is happening.

NOTE -- with great power comes great responsibility, think through the implications of using this for what you are doing, just because you "Can" do something, doesn't always mean it's the "Right" choice.
**NOTE**: with great power comes great responsibility, think through the implications of using this for what you are doing, just because you "Can" do something, doesn't always mean it's the "Right" choice.

[![Build Status](https://oneluckidev.visualstudio.com/OneLuckiDev/_apis/build/status/vsts-json-to-variable)](https://oneluckidev.visualstudio.com/OneLuckiDev/_build/latest?definitionId=16)


## Azure Dev Ops YAML
steps: --

` - task: OneLuckiDev.json2variable.vsts-json-to-variable.oneLuckiDevJson2Variable@1`
` displayName: 'JSON to Variable'`
` inputs:`
` jsonFile: '-- your json file here --'`
` shouldPrefixVariables: true `
` variablePrefix: prefixNameHere`

```yaml
steps:
- task: OneLuckiDev.json2variable.vsts-json-to-variable.oneLuckiDevJson2Variable@1
displayName: 'JSON to Variable'
inputs:
jsonFile: '-- your json file here --'
shouldPrefixVariables: true
variablePrefix: prefixNameHere
```

## Functionality
This task reads a JSON file, parses through it an set variable values based on the structure of the JSON that was read in. Variable will be created or updated if the exist already.
Expand Down