dorian-yaml-deep-pluck
Recursively pluck matching paths from YAML.
Install
gem install dorian-yaml-deep-pluckAlso included in the aggregate gem:
gem install dorianUsage
yaml-deep-pluck [options] key [key ...] [file ...]Run yaml-deep-pluck -h for generated option details and yaml-deep-pluck -v for the installed version.
Notes
- Keys can be mapping keys or array indexes. Use
--yamlfor YAML output or--rubyfor Ruby inspection output.
Examples
Find nested first elements
printf -- '- [1]\n- [2]\n' | yaml-deep-pluck 0