Extract array of property values from array

I have an array of Page objects, and I need to turn it in to an array of those page’s parents, but I’m having trouble finding a way to do it.

I feel like I should be able to do something like

{{ apply $.Data.Pages "index" "." "Parent" }}

But index doesn’t work on pages since they’re not actually maps. Anyone have any ideas?

The use case is that I have a bunch of pages nested under various sections, as well as a taxonomy which is only used in the child pages. On the taxonomy term pages I’d like to generate a list of all the pages with that term, grouped by section.

1 Like