Skip to content

Bloblang with method is not properly filtering arrays #2697

Open
@joreetz-otto

Description

@joreetz-otto

The with method in bloblang is not working as expected (at least for me after reading the doc on field paths) on objects in arrays.

rpk version v24.1.9 (rev 871368edb0)

Example:

root = {"a": [{"b": 1, "c": 2}, {"b": 3, "c": 4}]}
root = root.with("a.*.b")

Expected result:

{"a":[{"b":1},{"b":3}]}

Result

{"a":[{"b":1,"c":2},{"b":3,"c":4}]}

Even these give the same result

root = {"a": [{"b": 1, "c": 2}, {"b": 3, "c": 4}]}
root = root.with("a.1.b")
root = {"a": [{"b": 1, "c": 2}, {"b": 3, "c": 4}]}
root = root.with("a.*.IDONOTEXIST")

Metadata

Metadata

Assignees

No one assigned

    Labels

    bloblangBloblang featuresneeds investigationIt looks as though have all the information needed but investigation is required

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions