Skip to content

Commit

Permalink
add a new example to handle dots
Browse files Browse the repository at this point in the history
  • Loading branch information
4383 committed Jan 11, 2024
1 parent be484ee commit 1642a3c
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -851,6 +851,29 @@ $ niet . tests/samples/sample_not_indented.json
}
```
### Handle keys that contains dots
You may want to retrieve values from keys that contains dots, example:
```yaml
.foo:
something: "a"
bar:
something: "b"
foo.z:
something: "c"
```
Then you must surround keys that contains dots with quotes, example:
```
$ niet '".foo"' /tmp/test.yaml
something: a
$ niet '"foo.z"' /tmp/test.yaml
something: c
```
## Tips
Expand Down

0 comments on commit 1642a3c

Please sign in to comment.