You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

Accessing JSON file and updating it using groovy

Received Response


Hi guys,

Okay, here is what I have to do. I need to maintain JSON array in a file and modify it accordingly based on requirement. So, if it is possible, can you guys please guide how to proceed.

Content (required):

I need to maintain the following JSON:




"Day01": "Freeze",

"Day02": "Freeze",



"Day01": "Freeze",

"Day02": "Freeze",



The above JSON is a sample. So, just imagine there are 8 companies and for each company we have 12 periods. For each period I need to maintain "Freeze" or "Unfreeze" for 31 days.

Let us consider that when a user selects an action menu by selecting "Company1", "Jan" and "Day01" in the page of a form, the JSON should be updated like below in the file,

Howdy, Stranger!

Log In

To view full details, sign in.


Don't have an account? Click here to get started!