Given the input document:
{"a":1}
{"b":2}
{"c":3,"d":4}
What is the difference between the following jq programs (if any)? They all seem to produce the same output.
- jq '[., inputs] | map(to_entries[].value)'
- jq -n '[inputs] | map(to_entries[].value)'
- jq -s 'map(to_entries[].value)'
In other words, the following (simplified/reduced) invocations seem identical:
- jq '[.,inputs]'
- jq -n '[inputs]'
- jq -s '.'.
How are they different? Are there scenarios where one works, but the others don't? Did older versions of jq not support all of them? Is it performance related? Or simply a matter of readability and personal preference?
Bonus points (added later to the question): does the same hold true for the following programs?
- jq '., inputs | to_entries[].value'
- jq -n 'inputs | to_entries[].value'
- jq -s '.[] | to_entries[].value'
- jq 'to_entries[].value'
 
     
     
    