I searched some more and found that the “Site.Data…” are technically maps — not arrays — which could explain why the where does not work… Pretty counter-intuitive, especially since range works fine. See:
The method used to extract the desired data depends on the data structure, and there are an infinite number of possible structures. If you share a meaningful sample of your data, perhaps we can find a way to get what you need.
Thanks so much for the detailed answer and nifty tip with jsonify.
The nested-if solution works. How would you get the length of “featured spaces” in your example? You’d have to iterate and append into a new array, correct?
Seems useful if hugo could support maps with range where directly. Less mental overhead if site.pages + site.data would parse the same way. Anyway, that’s a feature request.