Commit Graph

9 Commits

Author SHA1 Message Date
Prithvipal Singh
1879ad91cd Addressed review suggestion 2020-02-22 23:25:31 +05:30
Prithvipal Singh
0439aef712 Fixed syntax document for escape character 2020-02-22 22:50:13 +05:30
tidwall
0360deb6d8 Added new modifiers
`@flatten` Flattens an array with child arrays.
  [1,[2],[3,4],[5,[6,7]]] -> [1,2,3,4,5,[6,7]]
The {"deep":true} arg can be provide for deep flattening.
  [1,[2],[3,4],[5,[6,7]]] -> [1,2,3,4,5,6,7]
The original json is returned when the json is not an array.

`@join` Joins multiple objects into a single object.
  [{"first":"Tom"},{"last":"Smith"}] -> {"first","Tom","last":"Smith"}
The arg can be "true" to specify that duplicate keys should be preserved.
  [{"first":"Tom","age":37},{"age":41}] -> {"first","Tom","age":37,"age":41}
Without preserved keys:
  [{"first":"Tom","age":37},{"age":41}] -> {"first","Tom","age":41}
The original json is returned when the json is not an object.

`@valid` Ensures that the json is valid before moving on. An
empty string is returned when the json is not valid, otherwise
it returns the original json.
2020-02-10 11:13:30 -07:00
aeneasr
8e8823353c
Add @this modifier
This modifier returns the current element as-is and can be used
to retrieve the JSON document itself. It is equivalent to the `#/` JSON Pointer.

Closes #149
2020-01-20 15:01:54 +01:00
tidwall
94e070960b Add link to multipaths 2019-11-01 05:15:58 -07:00
tidwall
dea71f728d Mention nested queries 2019-07-12 06:46:38 -07:00
Josh Baker
90ca17622f
Update SYNTAX.md 2019-07-10 15:00:07 -07:00
tidwall
4d138e058b Add multipath syntax 2019-06-30 12:59:56 -07:00
tidwall
f8322e865d Rename file 2019-06-28 17:18:24 -07:00