How to write a nested if/else statement in R4j (For Jira exported word)

I would like to export a requirement and I got 2 different types of requirements:

  1. Functional System Requirement
  2. Non-Functional System Req

each time I get the same requirement exported twice. this is what I tried:

 [[\if $.issuetype =”Requirement”]]
     [[\if $."Requirement Subtype" =”Functional System Requirement”]]

 **Got here Req1**

     [[/if]]
 [[/if]]

 [[\if $.issuetype =”Requirement”]]
     [[\if $."Requirement Subtype"= "Non Functional System Req"]]

 **Req1 again**
 
     [[/if]]
 [[/if]]

Does anyone know what I did wrong that in getting each requirement twice and not by the field "Requirement Subtype"? Thanks!