Variable substitution while file lookup

Hi,

I am loading a file using lookup eg “{{ lookup(‘file’, ‘cluster_policies.json’) | from_json }}”

Now my file cluster_policies.json contains some ansible variables that I need to substitute. Any idea how can it be done?

Thanks

Ok i found an answer.
{{ lookup(‘template’, ‘cluster_policies.j2’) }}
this works fine