diff --git a/operators/boolean-operators.md b/operators/boolean-operators.md index fb6ae394..a9f5ddab 100644 --- a/operators/boolean-operators.md +++ b/operators/boolean-operators.md @@ -12,9 +12,9 @@ These are most commonly used with the `select` operator to filter particular nod ## Related Operators -- equals / not equals (`==`, `!=`) operators (here)[https://mikefarah.gitbook.io/yq/operators/equals] -- comparison (`>=`, `<` etc) operators (here)[https://mikefarah.gitbook.io/yq/operators/compare] -- select operator (here)[https://mikefarah.gitbook.io/yq/operators/select] +- equals / not equals (`==`, `!=`) operators [here](https://mikefarah.gitbook.io/yq/operators/equals) +- comparison (`>=`, `<` etc) operators [here](https://mikefarah.gitbook.io/yq/operators/compare) +- select operator [here](https://mikefarah.gitbook.io/yq/operators/select) {% hint style="warning" %} Note that versions prior to 4.18 require the 'eval/e' command to be specified. diff --git a/operators/compare.md b/operators/compare.md index 577e6692..e096930f 100644 --- a/operators/compare.md +++ b/operators/compare.md @@ -10,9 +10,9 @@ The following types are currently supported: ## Related Operators -- equals / not equals (`==`, `!=`) operators (here)[https://mikefarah.gitbook.io/yq/operators/equals] -- boolean operators (`and`, `or`, `any` etc) (here)[https://mikefarah.gitbook.io/yq/operators/boolean-operators] -- select operator (here)[https://mikefarah.gitbook.io/yq/operators/select] +- equals / not equals (`==`, `!=`) operators [here](https://mikefarah.gitbook.io/yq/operators/equals) +- boolean operators (`and`, `or`, `any` etc) [here](https://mikefarah.gitbook.io/yq/operators/boolean-operators) +- select operator [here](https://mikefarah.gitbook.io/yq/operators/select) {% hint style="warning" %} Note that versions prior to 4.18 require the 'eval/e' command to be specified. diff --git a/operators/encode-decode.md b/operators/encode-decode.md index cf73bcd3..ba902955 100644 --- a/operators/encode-decode.md +++ b/operators/encode-decode.md @@ -11,7 +11,7 @@ These operators are useful to process yaml documents that have stringified embed | --- | -- | --| | Yaml | from_yaml | to_yaml(i)/@yaml | | JSON | from_json | to_json(i)/@json | -| Properties | | to_props/@props | +| Properties | from_props | to_props/@props | | CSV | | to_csv/@csv | | TSV | | to_tsv/@tsv | | XML | from_xml | to_xml(i)/@xml | @@ -123,6 +123,24 @@ b: | cool = thing ``` +## Decode props encoded string +Given a sample.yml file of: +```yaml +a: |- + cats=great + dogs=cool as well +``` +then +```bash +yq '.a |= from_props' sample.yml +``` +will output +```yaml +a: + cats: great + dogs: cool as well +``` + ## Encode value as yaml string Indent defaults to 2 diff --git a/operators/equals.md b/operators/equals.md index 21e0f496..e1686e98 100644 --- a/operators/equals.md +++ b/operators/equals.md @@ -16,9 +16,9 @@ The not equals `!=` operator returns `false` if the LHS is equal to the RHS. ## Related Operators -- comparison (`>=`, `<` etc) operators (here)[https://mikefarah.gitbook.io/yq/operators/compare] -- boolean operators (`and`, `or`, `any` etc) (here)[https://mikefarah.gitbook.io/yq/operators/boolean-operators] -- select operator (here)[https://mikefarah.gitbook.io/yq/operators/select] +- comparison (`>=`, `<` etc) operators [here](https://mikefarah.gitbook.io/yq/operators/compare) +- boolean operators (`and`, `or`, `any` etc) [here](https://mikefarah.gitbook.io/yq/operators/boolean-operators) +- select operator [here](https://mikefarah.gitbook.io/yq/operators/select) {% hint style="warning" %} diff --git a/operators/select.md b/operators/select.md index 7912fb11..1f1fdb4f 100644 --- a/operators/select.md +++ b/operators/select.md @@ -4,9 +4,9 @@ Select is used to filter arrays and maps by a boolean expression. ## Related Operators -- equals / not equals (`==`, `!=`) operators (here)[https://mikefarah.gitbook.io/yq/operators/equals] -- comparison (`>=`, `<` etc) operators (here)[https://mikefarah.gitbook.io/yq/operators/compare] -- boolean operators (`and`, `or`, `any` etc) (here)[https://mikefarah.gitbook.io/yq/operators/boolean-operators] +- equals / not equals (`==`, `!=`) operators [here](https://mikefarah.gitbook.io/yq/operators/equals) +- comparison (`>=`, `<` etc) operators [here](https://mikefarah.gitbook.io/yq/operators/compare) +- boolean operators (`and`, `or`, `any` etc) [here](https://mikefarah.gitbook.io/yq/operators/boolean-operators) {% hint style="warning" %} Note that versions prior to 4.18 require the 'eval/e' command to be specified.