I'd like to output a yaml structure to 1 single line #1862
-
I'd like to go from values:
first:
title: "Some title"
order_by: date
second:
title: "Another title"
order_by: rating to values: {first: {title: "Some title", order_by: date}, second: {title: "Another title", order_by: rating}} I've tried |
Beta Was this translation helpful? Give feedback.
Answered by
shakibamoshiri
Nov 22, 2023
Replies: 1 comment
-
Force the output to JSON then compact it yq -oj -I 0 file.yaml so We cannot have compact output with YAML |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
maxrem
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Force the output to JSON then compact it
so
-o
isj
= output format JSONWe cannot have compact output with YAML