mirror of
https://github.com/mikefarah/yq.git
synced 2026-07-10 16:55:40 +00:00
20 lines
277 B
Markdown
20 lines
277 B
Markdown
|
|
## Basic example
|
|
Given a sample.yml file of:
|
|
```yaml
|
|
hello: world
|
|
? look: non-string keys
|
|
: True
|
|
numbers: [123,456]
|
|
|
|
```
|
|
then
|
|
```bash
|
|
yq -o=lua '.' sample.yml
|
|
```
|
|
will output
|
|
```lua
|
|
return {["hello"]="world";[{["look"]="non-string keys";}]=true;["numbers"]={123,456,};};
|
|
```
|
|
|