java.lang.IllegalArgumentException: Invalid JSON expression:
Script1.groovy: 1: unexpected token: [ @ line 1, column 35.
$.items.[?(@.workProgramType=='Itemized')].id
^
1 error
My Question comes hear-- when I run in JSON path online validator it is working fine but the same when use in script (i.e. RestAssured) it is throwing an error.
NOTE: I am aware RestAssured internally use Gson but I have tried multiple resource could not land any solution
{
"schemaVersion": 1,
"methodologyId": "609b8ed9b46b1703e65aa0ed",
"revisionId": "60a6376eb46b1703e65abf30",
"rootOrder": [
"609b8eedaa642c3ea70c5404",
"609e2731aa642c3ea70c6311",
"60a63627aa642c3ea70c70ea"
],
"items": {
"609b8eedaa642c3ea70c5404": {
"itemType": "Folder",
"childOrder": [
"609bc9a9aa642c3ea70c5753",
"609b8ef3aa642c3ea70c5406"
],
"data": {
"itemType": "Folder",
"hidden": null,
"id": "609b8eedaa642c3ea70c5404"
}
},
"609b8ef3aa642c3ea70c5406": {
"parentId": "609b8eedaa642c3ea70c5404",
"itemType": "WorkProgram",
"childOrder": [
"609e26bcaa642c3ea70c630f",
"609e26abaa642c3ea70c6309",
"609bc993aa642c3ea70c574f",
"609b8f00aa642c3ea70c5408"
],
"data": {
"itemType": "WorkProgram",
"hidden": null,
"workProgramType": "QuestionAnswer",
"tailoring": "Allowed",
"visibility": "Show",
"ruleContextType": "Standard",
"id": "609b8ef3aa642c3ea70c5406"
}
}
how can I parse to get the desire output .