I\'ve a jenkins job with few parameters setup and I\'ve a JSON file in the workspace which has to be updated with the parameters that I pass through jenkins.
Example
With Pipeline Utility Steps plugin this is very easy to achieve.
jsonfile = readJSON file: 'path/to/your.json' jsonfile['environment'] = 'ENV2' writeJSON file: 'path/to/your.json', json: jsonfile