func where(entries interface{}, key string, cmp interface{}) (interface{}, error) {
	return generalizedWhere("where", entries, key, func(value interface{}) bool {
		return reflect.DeepEqual(value, cmp)
	})
}
selects entries based on key
package template
import (
	"reflect"
	"regexp"
	"strings"
	"github.com/nginx-proxy/docker-gen/internal/context"
)
func generalizedWhere(funcName string, entries interface{}, key string, test func(interface{}) bool) (interface{}, error) {
	entriesVal, err := getArrayValues(funcName, entries)
	if err != nil {
		return nil, err
	}
	selection := make([]interface{}, 0)
	for i := 0; i < entriesVal.Len(); i++ {
		v := reflect.Indirect(entriesVal.Index(i)).Interface()
		value := deepGet(v, key)
		if test(value) {
			selection = append(selection, v)
		}
	}
	return selection, nil
}