func (s sortableByKey) Less(i, j int) bool {
	values := map[int]string{i: "", j: ""}
	for k := range values {
		if v := reflect.ValueOf(deepGet(s.data[k], s.key)); v.Kind() != reflect.Invalid {
			values[k] = v.Interface().(string)
		}
	}
	return values[i] < values[j]
}
method required to implement sort.Interface
package template
import (
	"reflect"
	"sort"
)
func sortStringsAsc(values []string) []string {
	sort.Strings(values)
	return values
}
func sortStringsDesc(values []string) []string {
	sort.Sort(sort.Reverse(sort.StringSlice(values)))
	return values
}
type sortable interface {
	sort.Interface
	set(string, interface{}) error
	get() []interface{}
}
type sortableData struct {
	data []interface{}
}
func (s sortableData) get() []interface{} {
	return s.data
}
func (s sortableData) Len() int { return len(s.data) }
func (s sortableData) Swap(i, j int) { s.data[i], s.data[j] = s.data[j], s.data[i] }
type sortableByKey struct {
	sortableData
	key string
}
func (s *sortableByKey) set(funcName string, entries interface{}) (err error) {
	entriesVal, err := getArrayValues(funcName, entries)
	if err != nil {
		return
	}
	s.data = make([]interface{}, entriesVal.Len())
	for i := 0; i < entriesVal.Len(); i++ {
		s.data[i] = reflect.Indirect(entriesVal.Index(i)).Interface()
	}
	return
}