JSON.NUMMULTBY(deprecated)
As of JSON version 2.0, this command is regarded as deprecated.
Syntax
JSON.NUMMULTBY key path value
- Available in:
- Redis Open Source / JSON 1.0.0
- Time complexity:
- O(1) when path is evaluated to a single value, O(N) when path is evaluated to multiple values, where N is the size of the key
- ACL categories:
@json
,@write
,@slow
,
Multiply the number value stored atpath
bynumber
Required arguments
key
is key to modify.
value
is number value to multiply.
Optional arguments
path
is JSONPath to specify. Default is root$
.
Return
JSON.NUMMULTBY returns a bulk string reply specified as a stringified new values for each path, ornil
element if the matching JSON value is not a number.For more information about replies, seeRedis serialization protocol specification.
Examples
redis> JSON.SET doc .'{"a":"b","b":[{"a":2}, {"a":5}, {"a":"c"}]}'OKredis> JSON.NUMMULTBY doc $.a2"[null]"redis> JSON.NUMMULTBY doc $..a2"[null,4,10,null]"
See also
JSON.NUMINCRBY
|JSON.ARRINSERT
Related topics
- See also
- JSON.ARRAPPEND
- JSON.ARRINDEX
- JSON.ARRINSERT
- JSON.ARRLEN
- JSON.ARRPOP
- JSON.ARRTRIM
- JSON.CLEAR
- JSON.DEBUG
- JSON.DEBUG MEMORY
- JSON.DEL
- JSON.FORGET
- JSON.GET
- JSON.MERGE
- JSON.MGET
- JSON.MSET
- JSON.NUMINCRBY
- JSON.NUMMULTBY
- JSON.OBJKEYS
- JSON.OBJLEN
- JSON.RESP
- JSON.SET
- JSON.STRAPPEND
- JSON.STRLEN
- JSON.TOGGLE
- JSON.TYPE