That works. It’s just that I plan on having more values and so I’ll be duplicating code for each parameter. Every time I add a value, I need to add another <td>. I was trying to keep avoid having to repeat myself. Does that make sense?
I’ve been there before. Go orders keys by alphanum and there’s no way around it.
If you you know your keys you can do the following:
{{ range $book := .books }}
<tr>
{{ range slice "title" "price" "other" }}
{{ with index $book . }}
<td>{{ . }}</td>
{{ end }}
{{ end }}
</tr>
{{ end }}