JQLite - The query language for JSON.

Created a simple query language in Typescript.

Features:

  • Basic query selection
  • Fallback Mechanism
  • Wildcard support
  • Array Slices
  • Multiple Key Selection
  • Key Omission
  • Single Key Omission
  • Functions
  • Comparison Operators
  • Conditions
  • Configurable

Here’s an example to get a list of all products with an average review more than 4:

$.products[?(@.reviews.#avg() > 4)]

Runs in browsers, and Node.js

Documentation site: https://jqlite.vercel.app/

GitHub: https://github.com/Jay-Karia/jqlite

NPM Package: https://www.npmjs.com/package/jqlite-ts

Data source for the query: https://jqlite.vercel.app/demo.json

  • jay0072007OP
    link
    fedilink
    arrow-up
    2
    ·
    edit-2
    18 hours ago

    jq and JSONPath are awesome projects, and JQLite is not a replacement for existing tools, but a learning project.