File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -18,9 +18,9 @@ The `jsonpath2.path.Path` class represents a JSONPath.
1818>> > from jsonpath2.path import Path
1919>> > p = Path.parse_str(' $["hello"]' )
2020< jsonpath2.path.Path object >
21- >> > list ( map ( lambda match_data : match_data .current_value, p.match(d)))
21+ >> > [ match_data.current_value for match_data in p.match(d)]
2222[' Hello, world!' ]
23- >> > list ( map ( lambda match_data : match_data .node.tojsonpath(), p.match(d)))
23+ >> > [ match_data.node.tojsonpath() for match_data in p.match(d)]
2424[' $["hello"]' ]
2525```
2626
@@ -130,9 +130,9 @@ The syntax for a function call is the name of the function followed by the argum
130130>> > from jsonpath2.path import Path
131131>> > p = Path.parse_str(' $["hello"][length()]' )
132132< jsonpath2.path.Path object >
133- >> > list ( map ( lambda match_data : match_data .current_value, p.match(d)))
133+ >> > [m .current_value for m in p.match(d)]
134134[13 ]
135- >> > list ( map ( lambda match_data : match_data .node.tojsonpath(), p.match(d)))
135+ >> > [m .node.tojsonpath() for m in p.match(d)]
136136[' $["hello"][length()]' ]
137137```
138138
You can’t perform that action at this time.
0 commit comments