3 ms·
Some time ago I made this: https://github.com/fabriceleal/Jsoned https://github.com/fabriceleal/Jsoned using node.js. It allows you to use Javascript expressio
by fabriceleal 13y ago
Some time ago I made this: https://github.com/fabriceleal/Jsoned https://github.com/fabriceleal/Jsoned
using node.js.
It allows you to use Javascript expressions using a map/filter/reduce paradigm to edit the Json stream, like this:
echo "[1,2,3]" | jsoned -m "' _ * 2 '"
which will print "[2,4,6]"
you can even put the javascript code in files.
Check the wiki (incomplete) for documentation: https://github.com/fabriceleal/Jsoned/wiki/Usage https://github.com/fabriceleal/Jsoned/wiki/Usage