Skip to content

Allow map() and filter() builtins on map values #575

Description

@antonmedv

Right now, only array & slices are supported. And we have builtins values() & keys(), toPairs() & fromPairs(). But they are difficult to work with.

Allow to use map values in map() and filter() (maybe something else?)

events 
| groupBy(.Author)
| filter(.Rating > 8.0)
| filter(#key != "") // #key is the .author here
| map(.Posts)
| flatten()
| sum(len(.Comments))

The pointer # is value and #key is key.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions