bg de en es fr it nl pl pt sv tr zh

jq

Filter a list of JSON object based on a list of tags

alexwlchan’s notes

Use the arrays filter to remove empty values, the any(…) filter to check for set inclusion, then wrap the whole thing in square brackets.Here’s a problem I’ve had several times recently: I have an array of JSON objects which have an array of string tags, and I want to filter for objects with...

🧹 Tidying Up After Myself: Automatically Deleting Old GitHub Issues

Amedee

At some point, I had to admit it: I’ve turned GitHub Issues into a glorified chart gallery. Let me explain. Over on my amedee/ansible-servers repository, I have a workflow called workflow-metrics.yml, which runs after every pipeline. It uses yykamei/github-workflows-metrics to generate...

JQ functions, modules and dotfiles tips

eloycoto

Over the last months I’m using quite a lot JQ custom functions and modules, If you need to deal with the same JSON multiples times, maybe you need to dump this information easily human-readable format. Due to my work on top of Kubernetes, I need to deal with a lot of offline Kubernetes data, to...