The project is in a healthy, maintained state
evaluates ruby code on each of the json
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies
 Project Readme

dorian-json-each

Run a Ruby snippet for each top-level JSON item.

Install

gem install dorian-json-each

Also included in the aggregate gem:

gem install dorian

Usage

json-each [file ...] "ruby code"

Run json-each -h for generated option details and json-each -v for the installed version.

Notes

  • Arrays yield each element. Hashes yield key/value pairs. Values are converted to deep structs.

Examples

Print hash keys

json-each package.json "puts it.first"