In Hugo templates, how do you check length of JSON file array?

Viewed 752

In Hugo, you can assign the contents of a JSON file to a template variable:

  {{ $json := getJSON "posts.json" }}

How do you check the length in a condition block?

2 Answers
Related