Json

JSON.MSET

Sets multiple JSON values at multiple paths in multiple keys.

Arguments

paramsbody{ key: string, path: string, value: TData }[]required

A list of objects where each tuple contains a key, a path, and a value. Type of value (TData) can be Array<number>, string, boolean, Record<string, any>, or Array<any>.

Response

stringrequired

Returns "OK" if the command was successful.

Example
await redis.json.mset([  { key: key, path: "$.path", value: value},   { key: key2, path: "$.path2", value: value2}])
Loading search…