Accessing JSON file and updating it using groovy
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,
Tagged:
0