func SortFields(fields []j.Type) {
	sort.SliceStable(fields, func(i, j int) bool {
		a := fields[i].Name()
		b := fields[j].Name()
		if local(fields[i], fields[j]) {
			return true
		}
		if local(fields[j], fields[i]) {
			return false
		}
		if a == trim(b) {
			return false
		}
		if b == trim(a) {
			return true
		}
		return trim(a) < trim(b)
	})
}
SortFields sorts Jsonnet fields
package render
import (
	"sort"
	"strings"
	j "github.com/jsonnet-libs/k8s/pkg/builder"
)