1
0
mirror of https://github.com/rancher/steve.git synced 2025-09-07 10:21:33 +00:00

Added more fields - part 6. (#485)

* Added more fields - part 6.

* Tweaks needed to get 'batch.cronjobs' working

* Add a clarifying comment on pulling values out of an array.

* Use the correct capitalization for the etcd-snapshot kind.
This commit is contained in:
Eric Promislow
2025-03-04 09:31:21 -08:00
committed by GitHub
parent 0edba0da3e
commit 2711fd1f46
4 changed files with 23 additions and 1 deletions

View File

@@ -898,6 +898,7 @@ func getField(a any, field string) (any, error) {
}
obj = fmt.Sprintf("%v", t[key])
} else if i == len(subFields)-1 {
// If the last layer is an array, return array.map(a => a[subfield])
result := make([]string, len(t))
for index, v := range t {
itemVal, ok := v.(map[string]interface{})