Consul-template empty array when calling service by .Name

I have three healthy services which I can see on consul web UI, one of them being consul itself and the two other being defined in the configuration file like so

	"services": [
			"name": "",
			"address": "",
			"port": 8010,
				"name": "GET Check",
				"http": "",
				"method": "GET",
				"interval": "5s",
				"timeout": "1s"

Now in the web UI I can see that each service (consul, and have 1 instance each (where each instance’s name is the same as the service itself, thus, and consul).

The problem is that when I try to iterate over them using snippet from the Readme file, namely

{{ range services }}
svc: {{ .Name }}
{{ range service .Name }}
test: {{ .Name }}
{{ end }}{{ end }}

I’ll only see consul. The other two will not appear because {{ range service.Name }} will return an empty array.

svc: consul
test: consul

I can’t figure out why a service appears in the list of services but then it won’t appear when I try to fetch it via range service.

{{ range service.Name }}


{{ range service .Name }}


You have both in your question/ explanation, but which one isn’t working?