MCPcopy Create free account
hub / github.com/araddon/qlbridge / ArrayIndex

Struct ArrayIndex

expr/builtins/list_map.go:73–73  ·  view source on GitHub ↗

ArrayIndex array.index choose the nth element of an array given context input of "items" = [1,2,3] array.index(items, 1) => 1, true array.index(items, 5) => nil, false array.index(items, -1) => 3, true

Source from the content-addressed store, hash-verified

71// array.index(items, -1) => 3, true
72//
73type ArrayIndex struct{}
74
75// Type unknown - returns single value from SliceValue array
76func (m *ArrayIndex) Type() value.ValueType { return value.UnknownType }

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected