jello

Filter JSON and JSON Lines data using Python syntax

brewmacoslinux
Try with needOr install directly
Source

About

Filter JSON and JSON Lines data with Python syntax

Commands

jello

Examples

Extract a specific field from JSON data$ echo '{"name": "John", "age": 30}' | jello _.name
Filter JSON array to get items matching a condition$ echo '[{"id": 1, "active": true}, {"id": 2, "active": false}]' | jello '[x for x in _ if x["active"]]'
Transform JSON data with Python expressions$ echo '{"values": [1, 2, 3]}' | jello '{"sum": sum(_.values), "count": len(_.values)}'