To extract ids where "isFolder": false, use:
Python with jsonpath-ng:
from jsonpath_ng.ext import parse
# JSON response
json_response = {
"data": {
"tileGrid": {
"items": [
{"isFolder": True, "id": "123456"},
{"isFolder": False, "id": "6789192"}
]
}
}
}
jsonpath_expr = parse("$.data.tileGrid.items[?(@.isFolder == false)].id")
ids = [match.value for match in jsonpath_expr.find(json_response)]
print(ids) # Output: ['6789192']
JMeter JSON Extractor: JSONPath: $.data.tileGrid.items[?(@.isFolder == false)].id Match No.: -1 (for all matches) Variable: nonFolderIds This will extract 6789192. Debug to confirm variable values. Make sure to test pass valid JSON. use any available tools to validate JSON data.