1

I'm trying to use Extended Choice Parameter in my jenkins project - with the JSON option.

I've built a very nice JSON parameter "DestinationEnvironment", and I'm trying to get one of the its properties "DestinationServer" for the build step, but I'm not sure how I access the inner properties of it.

Will appreciate any help!

Yaron Adler
  • 492
  • 1
  • 5
  • 15

2 Answers2

1

The JSON Parameter feature for the Extended Choice Parameter is based on the https://github.com/jdorn/json-editor

So the groovy script should return a JSON object that corresponds to the "options" object referred to in json-editor

This can be parsed in a groovy script: http://groovy-lang.org/json.html

mmeier
  • 11
  • 2
0

{"DestinationEnvironment": "DestinationServer"}

Try this..