Skip to content

json.arrpop forces index=-1 with root path #3214

Closed
@rigazilla

Description

@rigazilla

Current Behavior

redis.jsonArrpop("k",new JsonPath("$"),i);

returns last element instead of element at pos i

Environment

  • Lettuce version(s): [e.g. 6.5.5.RELEASE]

Possible Solution

Should be an easy fix, see current code here:

if (jsonPath != null && !jsonPath.isRootPath()) {
// OPTIONAL as per API
args.add(jsonPath.toString());
if (index != -1) {
// OPTIONAL as per API
args.add(index);
}
}

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions