Skip to content

Commit

Permalink
Doc update
Browse files Browse the repository at this point in the history
  • Loading branch information
danielaparker committed Nov 24, 2023
1 parent f072217 commit 783afeb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions doc/ref/jsonpath/jsonpath_expression/evaluate.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ normalized path expressions.
(2) Evaluates the root value against the compiled JSONPath expression and calls a provided
callback repeatedly with the results.

Note: This function is kept for backwards compatability. New code should use the [select](select.md) function.

#### Parameters

<table>
Expand Down
4 changes: 3 additions & 1 deletion doc/ref/jsonpath/jsonpath_expression/update.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ It must have function call signature equivalent to
</tr>
</table>
The callback receives nodes with duplicates removed, and paths sorted in descending order.
### Examples
#### Update in place
Expand All @@ -41,7 +43,7 @@ int main()
std::ifstream is(/*path_to_books_file*/);
json doc = json::parse(is);
auto callback = [](const jsonpath::path_node& /*location*/, json& book)
auto callback = [](const jsonpath::path_node& /*path*/, json& book)
{
if (book.at("category") == "memoir" && !book.contains("price"))
{
Expand Down

0 comments on commit 783afeb

Please sign in to comment.