Please help to write 'range' statement with 'where'

Hello.
I need to modify: layouts -> single.html
I need a range statement. Now I have:

{{range $name, $taxonomy := .Site.Taxonomies.childrenof}}
{{ range $taxonomy.Pages }}
{{ .Render "summary" }}
{{ end }}
{{ end }}

It works. It lists all pages that have in ‘Front Matter’:

childrenof: ['n1']

or

childrenof: ['n2']

Question: how to modify original loop code for:
to render only pages which have in ‘Front Matter’: childrenof: [‘xxx’]

where xxx is Title OR Filename of current page.

Thank you!

If you search for range where here in the community you’ll get around 50 answers:

https://discourse.gohugo.io/search?q=range%20where

The solution to my question is to use (index …) function. https://gohugo.io/functions/index-function/

And remove 1 loop:

{{ range $taxonomy :=  (index .Site.Taxonomies.childrenof .Title) }}
{{ .Render "summary" }}
{{ end }}

@Leo_Merkel thank you.