I have the following code:
responseBody = '[{"properties":{"gridProperties":{"columnCount":26,"rowCount":1000},"index":3,"sheetId":1682983530,"sheetType":"GRID","title":"kamasi"}}]';
def jsonPathSearch = "sheets[?(@.properties.title=='kamasi')].properties"
def foundString = JsonPath.read(responseBody, jsonPathSearch)
println foundString.sheetId;
but it returns [1682983530], not 1682983530. It this possible to get 1682983530 without having to get the first element of the array such as foundString.sheetId[0]
? I know that there will be definitely only one element since the title of the sheet has to be unique