mirror of
https://github.com/mikefarah/yq.git
synced 2024-11-12 13:48:06 +00:00
docs
This commit is contained in:
parent
d99614f55a
commit
6d6cd43255
5
pkg/yqlib/doc/operators/headers/slice-array.md
Normal file
5
pkg/yqlib/doc/operators/headers/slice-array.md
Normal file
@ -0,0 +1,5 @@
|
||||
# Slice Array
|
||||
|
||||
The slice array operator takes an array as input and returns a subarray. Like the `jq` equivalent, `.[10:15]` will return an array of length 5, starting from index 10 inclusive, up to index 15 exclusive. Negative numbers count backwards from the end of the array.
|
||||
|
||||
You may leave out the first or second number, which will will refer to the start or end of the array respectively.
|
@ -1,3 +1,8 @@
|
||||
# Slice Array
|
||||
|
||||
The slice array operator takes an array as input and returns a subarray. Like the `jq` equivalent, `.[10:15]` will return an array of length 5, starting from index 10 inclusive, up to index 15 exclusive. Negative numbers count backwards from the end of the array.
|
||||
|
||||
You may leave out the first or second number, which will will refer to the start or end of the array respectively.
|
||||
|
||||
## Slicing arrays
|
||||
Given a sample.yml file of:
|
||||
|
@ -1,7 +1,12 @@
|
||||
4.29.1:
|
||||
- Fixed Square brackets removing update #1342
|
||||
- Added slice array operator (.[10:15]) #44
|
||||
- XML decoder/encoder now parses directives and proc instructions (#1344). Please use the new skip flags [documented here](https://mikefarah.gitbook.io/yq/usage/xml) to ignore them.
|
||||
- XML users note that the default attribute prefix will change to `+@` in the 4.30 release to avoid naming conflicts!
|
||||
- Improved comment handling of decoders (breaking change for yqlib users sorry)
|
||||
- Fixed load operator bug when loading yaml file with multiple documents
|
||||
- Bumped Go compiler version
|
||||
- Bumped dependencies
|
||||
|
||||
4.28.2:
|
||||
- Fixed Github Actions issues (thanks @mattphelps-8451)
|
||||
|
Loading…
Reference in New Issue
Block a user