You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* initial commit for multi index
* fix case when nothing is found in the array
* format code
* add tests and fix test
* Multi path: arrindex handle multi
* Multi path: arrindex handle multi - fix tests and update doc
* Multi path: arrindex - `stop` index can be negative
* Multi path: arrindex - per Guy's review
* Multi path: arrindex - fix legacy test with none-scalar value
* Multi path: arrindex - fixes per Gavrie's review
* Multi path: arrindex - fixes per Gavrie's review (2)
Co-authored-by: oshadmi <omer.shadmi@redislabs.com>
Search for the first occurrence of a scalar JSON value in an array.
254
254
255
255
The optional inclusive `start` (default 0) and exclusive `stop` (default 0, meaning that the last element is included) specify a slice of the array to search.
256
+
Negative values are interpreted as starting from the end.
257
+
256
258
257
259
Note: out of range errors are treated by rounding the index to the array's start and end. An inverse index range (e.g. from 1 to 0) will return unfound.
258
260
259
261
#### Return value
260
262
261
-
[Integer][2], specificallythe position of the scalar value in the array, or -1 if unfound.
263
+
[Array][4], specifically, for each JSON value matching the path, the first position of the scalar value in the array, -1 if unfound in the array, or [null][6] element if the matching JSON value is not an array.
262
264
263
265
### JSON.ARRINSERT
264
266
@@ -474,3 +476,4 @@ Return the JSON in `key` in [Redis Serialization Protocol (RESP)][5].
0 commit comments