jshon
jshon copied to clipboard
-d negative index not working
In man for -d
we have Negative array indexes will wrap around.
Trying $ echo '[1,2,3]' | jshon -d -1
[
1,
2,
3
]
Did I misinterpreted man?
This appears to work if it wraps around to the first element, but that's not very useful:
$ echo '[1,2,3]' | jshon -d -3
[
2,
3
]
Yes, it's not useful at all -- I have different structure in last element and must drop it before applying -a to rest. Without negative indexes it's relatively cumbersome task. I hope there is way to fix it at least.
On Tue, Aug 23, 2016, 02:04 Jordan Metzmeier [email protected] wrote:
This appears to work if it wraps around to the first element, but that's not very useful:
$ echo '[1,2,3]' | jshon -d -3 [ 2, 3 ]
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/keenerd/jshon/issues/47#issuecomment-241577806, or mute the thread https://github.com/notifications/unsubscribe-auth/AFdvMOW1xa8s0zcpzjqkj0-xnsA96TMyks5qiisBgaJpZM4JpTXo .