We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Please provide an example for JSON object assignment. Something equivalent to this:
npx jq '.scripts.build = "sass --load-path=./scss ./scss/style.scss:./css/style.css"' package.json
That is to add a value to json like this:
{ "name": "some-library", "version": "1.0.0", "scripts": { "test": "some test" }, }
And turn it into this:
{ "name": "some-library", "version": "1.0.0", "scripts": { "build": "sass --load-path=./scss ./scss/style.scss:./css/style.css", "test": "some test" }, }
There is no example or guide how to reference a value in the existing JSON object input. Would really know how to do it. Thanks.
The text was updated successfully, but these errors were encountered:
jq.node 'tap(x => x.scripts.build= "sass --load-path=./scss ./scss/style.scss:./css/style.css")' < package.json
with package.json being:
{ "name": "some-library", "version": "1.0.0", "scripts": { "test": "some test" } }
output is:
{ "name": "some-library", "version": "1.0.0", "scripts": { "test": "some test", "build": "sass --load-path=./scss ./scss/style.scss:./css/style.css" } }
Enjoy 👍
Sorry, something went wrong.
No branches or pull requests
Please provide an example for JSON object assignment. Something equivalent to this:
That is to add a value to json like this:
And turn it into this:
There is no example or guide how to reference a value in the existing JSON object input. Would really know how to do it. Thanks.
The text was updated successfully, but these errors were encountered: