Updating docs

This commit is contained in:
Mike Farah 2021-06-10 08:35:41 +10:00
parent 78af68f436
commit 09c5ed24be
3 changed files with 9 additions and 9 deletions

View File

@ -1,4 +1,4 @@
This is the simplest (and perhaps most used) operator, it is used to navigate deeply into yaml structurse.
This is the simplest (and perhaps most used) operator, it is used to navigate deeply into yaml structures.
## Simple map navigation
Given a sample.yml file of:
```yaml
@ -63,7 +63,7 @@ will output
frog
```
## Multiple special characters
## Nested special characters
Given a sample.yml file of:
```yaml
a:
@ -230,8 +230,7 @@ will output
## Traversing nested arrays by index
Given a sample.yml file of:
```yaml
- []
- - cat
[[], [cat]]
```
then
```bash

View File

@ -1 +1 @@
This is the simplest (and perhaps most used) operator, it is used to navigate deeply into yaml structurse.
This is the simplest (and perhaps most used) operator, it is used to navigate deeply into yaml structures.

View File

@ -78,7 +78,7 @@ var traversePathOperatorScenarios = []expressionScenario{
},
},
{
description: "Multiple special characters",
description: "Nested special characters",
document: `a: {"key.withdots": {"another.key": apple}}`,
expression: `.a["key.withdots"]["another.key"]`,
expected: []string{
@ -253,9 +253,10 @@ var traversePathOperatorScenarios = []expressionScenario{
},
},
{
description: "Traversing nested arrays by index",
document: `[[], [cat]]`,
expression: `.[1][0]`,
description: "Traversing nested arrays by index",
dontFormatInputForDoc: true,
document: `[[], [cat]]`,
expression: `.[1][0]`,
expected: []string{
"D0, P[1 0], (!!str)::cat\n",
},