Relative Content

Tag Archive for jsoneggplant

Eggplant Functional – writing to json file

I’m creating a new patient in my test system. I have extracted the text using search rectangles to read the text and log the output. Since I’m putting a random number generator at the end of the patients name, I’m needing to dynamically read the patient name (+the random characters) and then write that to a json file.
I have the patient name nested under Patient Info. I can read from here but I’m trying to write the newly captured patient name. Also, would be beneficial if we could remove the existing or create a copy of the json file and replace the existing with the new info. I think that’s how we would have to go about this. Any insights on the syntax in how to write to a json file would be appreciated.