Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

-d does not remove nodes deeper than root level #5

Open
paul-hammant opened this issue Jun 21, 2012 · 2 comments
Open

-d does not remove nodes deeper than root level #5

paul-hammant opened this issue Jun 21, 2012 · 2 comments

Comments

@paul-hammant
Copy link

{
"bar": "hello",
"baz": 2,
"blort":
{
"aaa": "hello",
"bbb": 2
}
}

jshon -d aaa
(does not remove aaa)

@keenerd
Copy link
Owner

keenerd commented Jun 21, 2012

Sure it can. Jshon can not read your mind, you have to drill down if
you want to modify deeper levels.

jshon -e blort -d aaa -p

Do you have any suggestions for better expressing this in the docs?

Patches for mind-reading will of course be accepted :-)

@paul-hammant
Copy link
Author

Damn, I keep hitting that close button, when I mean comment.

I'm thinking that there's some XPath way of referring to nodes to delete. Two alternates exist already – JAQL or JsonPath
(http://code.google.com/p/jaql and http://goessner.net/articles/JsonPath/)

These would be ideal :

jshon -d //blort/aaa
jshon -d /blort/aaa

Sadly my C skill as remedial :(

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

No branches or pull requests

2 participants