Skip to content

Conversation

@ninewise
Copy link

Rotates the two top items on the stack. This allows for some powerful manipulations.

  • Wrap a json as a value (add wrap (-w) option #52): echo '{"a":1, "b":2}' | jshon -e a -n object -r -i a2 -i a becomes {"a": {"a2": 1}, "b":2}
  • Selecting some items by key (Extract and insert into new object #55): echo '{"a":1, "b":2, "c":3}' | jshon -e a -r -e b -r -p -n object -r -i b -r -i a becomes {"b":2, "a":1}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant