Get fields from an array of objects of a json input #80
-
How to get fields from an a I have this input {
"items": [
{ "kind": "Pod" },
{ "kind": "Image" }
]
} with but I cannot do that with Many thanks in advance. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
@ifraixedes I have converted this to a Q&A discussion as it is not a feature request. |
Beta Was this translation helpful? Give feedback.
-
To do this you should use the any index selector in combination with the multi flag. The full selector looks like:
Here's an example on the playground: https://dasel.tomwright.me/s/d6f56db3-bc64-4f3f-9529-f617e6483dcc The full command will look like this:
If you don't want the resulting lines to be quoted you can use the |
Beta Was this translation helpful? Give feedback.
To do this you should use the any index selector in combination with the multi flag.
The full selector looks like:
Here's an example on the playground: https://dasel.tomwright.me/s/d6f56db3-bc64-4f3f-9529-f617e6483dcc
The full command will look like this:
If you don't want the resulting lines to be quoted you can use the
--plain
flag.