stedolan/jq — pull request #118 by nicowilliams (2013-05-07 01:22:43+00:00)
Title: Add --argfile variant of --arg (issue #117)

This is useful when one has a database (in JSON form) to query using jq
input data.

% echo '{"a":1, "c":5}' > db.json
% echo '"c"'|./jq --argfile f /tmp/a '$f[.]'
5
% echo '"a"'|./jq --argfile f /tmp/a '$f[.]'
1
% echo '"b"'|./jq --argfile f /tmp/a '$f[.]'
null
%