Skip to content(if available)orjump to list(if available)

Show HN: FilterQL – A tiny query language for filtering structured data

Show HN: FilterQL – A tiny query language for filtering structured data

7 comments

·August 24, 2025

Hey all, I just released v2.0.0 of FilterQL, a query language and TypeScript library. This version adds support for Operations, which allow you to transform the data after filtering.

If you think this would be useful in a project you're working on, give it a try and let me know what you think!

drinkcocacola

I see a mismatch between the library API `filter` vs the supported operator `| SORT rating desc"`. You could use the API to your advantage by separating concerns: add a new `.sort("fieldName")` method.

``` const recentGoodMovies = filterql .filter(movies, "year >= 2008") .sort("rating") .desc()

```

If adding helper methods for semantics and clarity is not the intent of the library, then I'd rename the `filter` method since it doesn't communicate the intention clearly.

The function executes a full pipeline filter expression + `|` operations like `SORT` and `LIMIT` (not just a predicate filter). So for instance naming it to `query` will match your README terminology and grammar (`query := filter | operation*`)

MoyoGeorge

Any plans on this supporting JSONSchema? Seeing as most/all popular TypeScript validation libraries, which will likely be used to define the shape of the data, support converting to JSONSchema now?

h1fra

why a dsl when you could do ql.filter<Movies>(movies).where('y', '>=', 2008) or even just use kysely with a plugin

cdaringe

I like it! It’s nice offering a little DSL in various spaces. Curious where you’re plugging it in?

Any intended support for collections/sets? In JQL is do ‘“foo” not in (“evil”, “silly”)’ or similar matchers over sets, like if tags are on a ticket or if tickets an in an N states

LtdJorge

The README is so good; visual demonstration, documentation, examples, proper Markdown formatting.. Love it.

olivergregory

It seems nice. However is there any way to query arrays within the datastructure itself? Or go deeper in the hierarchy, such as "model.cost"?

silicon_laser

is there some thing like this in python?