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
Function to strip quotes from a string #106
Labels
Comments
alternatively it could be a comand line switch to print strings without quotes: curl ... | jq -z .keypairs[$i].keypair.name |
|
ah thanks didn't see that one |
Great, thanks ghost |
dtolnay
changed the title
Feature Request: Function to strip quotes from a string
Function to strip quotes from a string
Jul 27, 2015
Thanks @ghost ! |
awesome this helped me too thanks |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When getting output from json apis and attempting to use them with other unix utilities, you often need just the value of a string without the surrounding quotes. Clearly i can do something like:
curl ... | jq .keypairs[$i].keypair.name | tr -d '"'
but it would be nice to be able to do:
curl ... | jq '.keypairs[$i].keypair.name | tovalue'
or something along those lines
The text was updated successfully, but these errors were encountered: