This is my JSON object
{
"master": {
"node": "xyz",
"files": [{"type": "modified", "file": "test.txt"}]
},
"testbranch2": {
"node": "abc",
"files": [{"type": "modified", "file": "test.txt"}]
},
"testbranch": {
"node": "xxx",
"files": [{"type": "modified", "file": "test.txt"}],
}
}
I need only the key names of the objects, such as "master", "testbranch2", "testbranch". How to get only key object names using groovy?
source
share