How to add twig code in View 'global custom text' field? I want to add if condition in my "global custom text" field saying if node is published, print some link. I tried below steps , but it is not working:
1.I have added "Content: Publishing status" field and hidden it from display
2.In 'global custom text' field added below code:
Replacement pattern for published status is {{ status }} and is returning 0 or 1. 
Code I added is:

  {% if  status  ==0 %}
    &lt;div class="apply_job"&gt;&lt;a href="/appy-job" target="_blank"&gt; APPLY
 &lt;/a&gt;&lt;/div&gt;
    {% endif %}


Drupal Version:8.2.0

Can anybody help me to make this working? 
Thank you In Advance
I try that right now and worked for me.


Note: just make sure set Output format to 0/1

{% if  status  %}
   &lt;div class="apply_job"&gt;&lt;a href="/appy-job" target="_blank"&gt; APPLY &lt;/a&gt;&lt;/div&gt;
{% endif %}