Update why-you-should-learn-jq-in-2024.mdx 0696867e
Steve Simkins · 2024-10-13 14:11 1 file(s) · +1 −1
src/content/post/why-you-should-learn-jq-in-2024.mdx +1 −1
120 120
pinata files list -n pinnie | jq .files[0].cid | xargs pinata gateways open
121 121
```
122 122
123 -
You might have noticed we slipped on extra tool in here called `xargs` and while it’s outside the scope of this post I would highly recommend learning that tool as well. Back to `jq`, let’s try something else. What if I need the file names for not just the last 5 results but 50 or 100. How do we go outside just one index of an array? Just a little change in our syntax.
123 +
You might have noticed we slipped an extra tool in here called `xargs` and while it’s outside the scope of this post I would highly recommend learning that tool as well. Back to `jq`, let’s try something else. What if I need the file names for not just the last 5 results but 50 or 100. How do we go outside just one index of an array? Just a little change in our syntax.
124 124
125 125
```
126 126
pinata files list | jq [.files[].name]