My JSON file
{
"General": [
{
"AppUrl": "abc.com/",
"HTTPResponseCode": "200",
"QA Build Version#": "4.3.44"
}
]
}
I want to get the count elements(key-value pairs) of the above JSON object.
I tried with the below code but it returns a count
as 1.
My code
def InputJSON = new JsonSlurper().parse(new File(fileName))
def count = InputJSON.General.size()