Untitled
unknown
plain_text
2 years ago
311 B
7
Indexable
# Assume your YAML data is as follows
yaml_data='
builds:
- name: v1
tests:
- eksVersion: "1.27"
- name: v2
tests:
- eksVersion: "1.28"
'
# Use yq to concatenate fields
output=$(yq e '.builds[] | "\(.name): \(.tests[0].eksVersion)"' <<< "$yaml_data")
# Print the output
echo "$output"
Editor is loading...
Leave a Comment