Evaluating twig variable in twig for loop

Hi All!
Am I missing something really simple when trying to refer to a set twig variable in my loop here?:

“{% for post in page.find(’/home’).children if post.header.author_name =={{author}}}”

{{author}} was set prior to and works in other places, but doesn’t appear to be evaluated in that block. Do I have any alternative ways to refer to that/other variables here? The code above works if I explicitly assign a variable there, e.g. ’ ==“testAuthor” ’

Thanks!

As a correction to the above, for the last statement, I meant assigning an explicit non-twig variable value there (e.g. that string)

You don’t need to nest twig tags:

{% for post in page.find('/home').children if post.header.author_name == author %}

Thanks for the response @rhukster.

For some reason, when I use author there, I don’t see anything resulted:

'{% set author = page.header.author_name %}

{{author}}

{{ page.content }}

Pieces by {{author}}:

			{% for post in page.find('/home').children if post.header.author_name == author %}
				<li class="recent-posts">
				    <strong><a href="{{ post.url }}">{{ post.title }}</a></strong>
			    </li>
		    {% endfor %}'

While explicitly setting the author to a string seems to work @_@. Of note, {{author}} does evaluate appropriately when used above it in other places

Maybe echo out {{ author }} to make sure it’s set to something you expect.

Thanks Rhukster! Your comment made me realize my idiocy here. There was a capital character in the author_name variable which was causing the issue.