yq/pkg/yqlib/doc/usage/lua.md
2023-08-05 17:28:21 +02:00

30 lines
309 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,
};
};
```