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

Fixed length of null to be zero

This commit is contained in:
Mike Farah
2021-01-26 10:21:16 +11:00
parent 071ec3c08c
commit f46fe384bd
3 changed files with 43 additions and 1 deletions

View File

@@ -16,6 +16,20 @@ will output
3
```
## null length
Given a sample.yml file of:
```yaml
a: null
```
then
```bash
yq eval '.a | length' sample.yml
```
will output
```yaml
0
```
## Map length
returns number of entries