JSON.OBJLEN

    Report the number of keys in the JSON object at in key

    Required arguments

    is key to parse. Returns null for nonexistent keys.

    path

    Return

    JSON.OBJLEN returns an array of integer replies for each path specified as the number of keys in the object or nil, if the matching JSON value is not an object. For more information about replies, see .

    1. dragonfly> JSON.SET doc $ '{"a":[3], "nested": {"a": {"b":2, "c": 1}}}'
    2. OK
    3. 1) (nil)
    4. 2) (integer) 2

    See also

    JSON.ARRINDEX | JSON.ARRINSERT