API ReferenceJSON
JSONSet
Set a JSON document or path
Syntax
Redix.JSONSet(key, path, value)Parameters
Prop
Type
Returns
Prop
Type
Examples
-- Set entire document
Redix.JSONSet('character:123', '$', {
name = 'John',
level = 50,
stats = {
health = 100,
armor = 50
}
})
-- Update specific field
Redix.JSONSet('character:123', '$.level', 55)
-- Update nested field
Redix.JSONSet('character:123', '$.stats.health', 80)Requires Redis Stack with RedisJSON module