1
0
mirror of https://github.com/taigrr/yq synced 2025-01-18 04:53:17 -08:00

Added get key examples

This commit is contained in:
Mike Farah
2020-11-26 11:20:53 +11:00
parent 5205f01248
commit 13679e51e2
5 changed files with 54 additions and 1 deletions

View File

@@ -1 +1,3 @@
The path operator can be used to get the traversal paths of matching nodes in an expression. The path is returned as an array, which if traversed in order will lead to the matching node.
The path operator can be used to get the traversal paths of matching nodes in an expression. The path is returned as an array, which if traversed in order will lead to the matching node.
You can get the key/index of matching nodes by using the `path` operator to return the path array then piping that through `.[-1]` to get the last element of that array, the key.