Skip to content
This repository

json 2 "-a" output is wrong if requested key doesn't exist in one of the items #23

Closed
trentm opened this Issue October 25, 2011 · 1 comment

1 participant

Trent Mick
Trent Mick
Owner

Get this:

$ echo '[{"a":1}, {"a":2, "b":3}]' | bin/json -a a
1
2
$ echo '[{"a":1}, {"a":2, "b":3}]' | bin/json -a a b
1 2 3
$ echo '[{"a":1}, {"a":2, "b":3}]' | bin/json -a a b -d,
1,2,3

Want this:

$ echo '[{"a":1}, {"a":2, "b":3}]' | bin/json -a a
1
2
$ echo '[{"a":1}, {"a":2, "b":3}]' | bin/json -a a b
1 
2 3
$ echo '[{"a":1}, {"a":2, "b":3}]' | bin/json -d, -a a b
1,
2,3
Trent Mick
Owner

json 2.0.1

[master f43c627] [issue#23] Fix output in '-a|--array' mode if one or more keys don't exist in one or more of the array items.

Trent Mick trentm closed this October 25, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.