-
Notifications
You must be signed in to change notification settings - Fork 79
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
String interpolation #75
Comments
I agree with you that this would be nice to have. The name of this functionality is called "string interpolation", and I have put it into the README among the jq functionality that jaq does not implement yet. However, I do not have the motivation to work on this myself. If you feel like implementing it, go ahead! |
Here's how I do it currently. Not as readable as I wished. def interpolate: map(tostring) | add;
def s: if isarray then interpolate else tostring end;
def a: "a";
def b: "b";
# usage
["{ a: ", a, ", b: ", b, " }"] | s |
@nitsanavni, well, in that case you could just do something like |
@pkoppstein, couldn't you just write |
Yes. Not having string interpolation is a source of such frustration that I wasn’t thinking clearly. My apologies. |
No worries. :) |
This is now implemented in #109. |
It would be great to print values with arbitraty text like jq's:
Source: stedolan/jq#614
The text was updated successfully, but these errors were encountered: