code: func (j *JSONPath) evalArray(input []reflect.Value, node *ArrayNode) ([]reflect.Value, error) {
  	result := []reflect.Value{}
  	for _, value := range input {
  
  		value, isNil := template.Indirect(value)
  		if isNil || (value.Kind() != reflect.Array && value.Kind() != reflect.Slice) {
  			return input, fmt.Errorf("%v is not array or slice", value.Type())
  		}
  		params := node.Params
  		if !params[0].Known {
  			params[0].Value = 0
  		}
  		if params[0].Value < 0 {
  			params[0].Value += value.Len()
  		}
  		if !params[1].Known {
  			params[1].Value = value.Len()
  		}
  
  		if params[1].Value < 0 {
  			params[1].Value += value.Len()
  		}
  
  		sliceLength := value.Len()
  		if params[1].Value != params[0].Value { // if you're requesting zero elements, allow it through.
  			if params[0].Value >= sliceLength {
  				return input, fmt.Errorf("array index out of bounds: index %d, length %d", params[0].Value, sliceLength)
  			}
  			if params[1].Value > sliceLength {
  				return input, fmt.Errorf("array index out of bounds: index %d, length %d", params[1].Value-1, sliceLength)
  			}
  		}
  
  		if !params[2].Known {
  			value = value.Slice(params[0].Value, params[1].Value)
  		} else {
  			value = value.Slice3(params[0].Value, params[1].Value, params[2].Value)
  		}
  		for i := 0; i < value.Len(); i++ {
  			result = append(result, value.Index(i))
  		}
  	}
  	return result, nil
  }
docs: // evalArray evaluates ArrayNode