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
12
Views
2
Comments

Summary:

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:

"Company1"

{

"Jan"{

"Day01": "Freeze",

"Day02": "Freeze",

}

"Feb"{

"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.

Register

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