I am trying evaluate a JSON text using the expression $.sessions[?(@.key=='session3')].value using Jayway JsonPath 2.2.0 library.
JsonText = {
"username": xyz,
"empid": "1",
"sessions": [{
"key": "session1",
"value": "java"},
{
"key": "session2",
"value": "C"}]
}
It return empty object instead of null even if I am using Option.DEFAULT_PATH_LEAF_TO_NULL
I tried evaluating this through http://jsonpath.herokuapp.com/ and there also it returns empty array. Please help
I am trying evaluate a JSON text using the expression $.sessions[?(@.key=='session3')].value using Jayway JsonPath 2.2.0 library.
JsonText = {
"username": xyz,
"empid": "1",
"sessions": [{
"key": "session1",
"value": "java"},
{
"key": "session2",
"value": "C"}]
}
It return empty object instead of null even if I am using Option.DEFAULT_PATH_LEAF_TO_NULL
I tried evaluating this through http://jsonpath.herokuapp.com/ and there also it returns empty array. Please help