-
-
Notifications
You must be signed in to change notification settings - Fork 189
Closed
Description
The following snippet
json test = json::parse(R"(
{
"books": [
{"title": "b1", "chapters":[{"subtitle":"b1c1"}]},
{"title": "b2", "chapters":[{"subtitle":"b2c1"}]}
]
} )");
json path_result = json_query(test, "$..[?(@.subtitle == 'b2c1')]", result_type::path);
std::cout << path_result.to_string() << std::endl;prints out
["$['books']['chapters'][0]"]
while I expected ["$['books'][1]['chapters'][0]"]
It seems that the path result skips array indices, which prohibits me from finding the location of the matched data item in the json structure.