iter-json
Iterate over a JSON array on the shell.
Last updated 4 years ago by fiatjaf .
MIT · Original npm · Tarball · package.json
$ cnpm install iter-json 
SYNC missed versions from official npm registry.

iter-json

Imagine you have a file with an enourmous JSON array and you want to quickly execute shell commands for each item in the array, starting at index 7 and ending at index 48.

And you have jq or similar.

And fish.

for item in (cat json-data.json | jq '.list-of-items[7:48]' | iter-json)
    set value (echo $item | jq '.somekey')
    # do something
end

Current Tags

  • 0.0.2                                ...           latest (4 years ago)

2 Versions

  • 0.0.2                                ...           4 years ago
  • 0.0.1                                ...           4 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (1)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |