I have a variable of a large JSON data of students' data of different classes containing their names and numbers respectively. The variable is "data" and here is what the variable contains:
{
"Class001": [
{
"Jesse": 001
},
{
"Adam": 002
}
],
"Class002": [
{
"Jill": 111
},
{
"Ray": 112
}
],
.....
}
Using ansible, I want to separate the keys "Class00X" into some different files. For example, the Class001 file contain:
{
"Jesse": 001
},
{
"Adam": 002
},
.....
etc. How can i do this? thanks