require 'json' def main(orchAttr, inputMap) returnMap = {} # Get the Input String sourceFileName = inputMap["SourceFileName"] #Read in the file from the temp directory path = orchAttr.getTempFileName(sourceFileName) fileText = File.read(path) # Parse to a JSON Object inpuToObject = JSON.parse(fileText) #Modify JSON values inpuToObject['Status Input']= 'POOR' #Adding an extra JSON tag to the json. inpuToObject['NewOutput']= 'MyNewValue' #generate a string from the JSON object outputObject = JSON.pretty_generate(inpuToObject) #Write the string to the output file in the temp directory File.write(path, outputObject) #return the output file path returnMap["outputObject"] = outputObject return returnMap end