this post was submitted on 11 May 2025
67 points (92.4% liked)

Programming

21120 readers
302 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities [email protected]



founded 2 years ago
MODERATORS
 

Created a simple query language for JSON data.

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 the list of adult friends:

$.friends[?(@.age >= 18)]

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

⭐ Leaving a star on GitHub is much appreciated!

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 9 points 1 month ago (4 children)

https://jqlang.org/

I've been using that for all my JSON extraction and processing needs. Let me automate a bunch of my builds for JS stuff for FoundryVTT https://gitlab.com/foundry-azzurite/pings/-/blob/master/build/build.sh

[–] [email protected] 4 points 1 month ago (3 children)

Thanks for sharing the project! JQLite is aimed to run in browsers and node, but will definitely take inspiration from "jq".

[–] [email protected] 14 points 1 month ago* (last edited 1 month ago) (1 children)

I just kinda wonder why when you're in a browser or node, you wouldn't just do

const json = {...};
json.friends.filter(f => f.age >= 18);

why learn another language when you already literally got the language to process JavaScript Object Notation right there.

[–] [email protected] 9 points 1 month ago (1 children)

100% agreed. It's just a learning/hobby project, to know more about parsers, and how languages work. Some of the features like Wildcard, Multiple key selection/omission comes handy, and might add more features like that.

[–] [email protected] 5 points 1 month ago

Totally fair. Sounds fun :)

load more comments (1 replies)
load more comments (1 replies)