kislyuk / yq

Command-line YAML, XML, TOML processor - jq wrapper for YAML/XML/TOML documents
https://kislyuk.github.io/yq/
Apache License 2.0
2.57k stars 82 forks source link

How to read tags of a property? #111

Open rayzorben opened 3 years ago

rayzorben commented 3 years ago

Example:

user:
  name: ray
  password: !secret U&n78asdn9sdf8/a=321470

yq .user.password file.yml correctly returns just the value without the tag U&n78asdn9sdf8/a=321470

How can I found out what tags belong to .user.password e.g.; yq '.user.password | tags' file.yml would return secret or !secret?

Or I would like to get all values with a specific tag yq '.. | tag("secret")

TIA

kislyuk commented 3 years ago

This is not currently supported.