Multiple data source one range

I have multiple files in a folder "data/files/…"like:

2019-5-1_14-a.json

[
  {
    "site": "https://www.bnbs.com › ...",
    "date": "2019-5-1_14-1",
    "device": "mobile"
  },
{
    "site": "https://www.bnbs.com › ...",
    "date": "2019-5-1_15-1",
    "device": "mobile"
  }
]

2019-5-1_14-b.json

[
  {
    "site": "https://www.bnbs.com › ...",
    "date": "2019-5-1_16-2",
    "device": "mobile"
  },
{
    "site": "https://www.bnbs.com › ...",
    "date": "2019-5-1_17-2",
    "device": "mobile"
  }
]

And try this:

<ul>
   {{ range $.Site.Data.files }}
   <li>
      {{ .date  }}
   </li>
  {{ end }}
</ul>

Without result: “can’t evaluate field kw in type interface {}”

Do you know why, and how can I fix it?

This ranges through the list of files, so the “dot” is one json file. You need an inner range to iterate over the array inside the json file:

{{ range $.Site.Data.files }}
  {{ range . }}
    {{ .date }}
  {{ end }}
{{ end }}