Summary
Add a pipe operator (|) that allows composing queries sequentially, where the output of one query becomes the input to the next.
Proposed Syntax
{ users } | { name, email }
{ orders(status = "pending") } | { items } | { price }
Motivation
Query composition via piping would unlock multi-step transformations and make complex workflows expressible without deep nesting. This is jq's killer feature and one of the main reasons people stick with it despite the steep learning curve. Adding this to gq's already-intuitive syntax would be a significant competitive advantage.
Considerations
- How does the pipe interact with array context? (e.g., does
{ users } | { name } automatically map over array elements?)
- Should there be a way to reference the piped input explicitly?
- Interaction with the Jinja template feature
Summary
Add a pipe operator (
|) that allows composing queries sequentially, where the output of one query becomes the input to the next.Proposed Syntax
Motivation
Query composition via piping would unlock multi-step transformations and make complex workflows expressible without deep nesting. This is jq's killer feature and one of the main reasons people stick with it despite the steep learning curve. Adding this to gq's already-intuitive syntax would be a significant competitive advantage.
Considerations
{ users } | { name }automatically map over array elements?)