title: how to use ng-if for nested array of objects
body: <p>doc.html</p>
  
  <pre><code>&lt;tr data-ng-repeat="childCondition in model.rule_key[$index]"&gt;
      &lt;th&gt; {{ childCondition.KEY_NAME }} &lt;/th&gt;
      &lt;td&gt;
      &lt;input type="text" class="form-control" ng-model="rule1.childCondition[$parent.$parent.$index][childCondition.KEY_NAME]"
                                                   name="childCondition.KEY_NAME"  ng-if="childCondition.KEY_NAME == 'Value'" required/&gt;
                                                   &lt;span style="color:red" ng-show="main.AssetURL.$error.required "&gt;Service name&lt;/span&gt;
  
                                                   &lt;select name="childCondition.KEY_NAME" class="form-control" 
                                                   ng-options="host.Name as host.Name for host in hosts" 
                                                   ng-model="rule1.childCondition[$parent.$parent.$index][childCondition.KEY_NAME]"ng-if="childCondition.KEY_NAME == 'Host'" ng-disabled="readonly"&gt;
                                                   &lt;option value=""&gt;&lt;/option&gt;
                                                   &lt;/select&gt;
  
  
                                                &lt;/td&gt;
                                                &lt;td&gt; {{ childCondition.DESCRIPTION }} &lt;/td&gt;
                                              &lt;/tr&gt;
  </code></pre>
  
  <p>doc.js</p>
  
  <pre><code>var newcondition = JSON.stringify(rule1.childCondition);
  </code></pre>
  
  <p>current output</p>
  
  <pre><code>newcondition = [{"Value":"TEST", "Host":"TEST"}, {"Value":"TEST1", "Host":"TEST1"}]
  </code></pre>
  
  <p>But i want the json output in the below form(nested array of objects)</p>
  
  <p>Expected output is:  </p>
  
  <pre><code> [
        {
         "Trigger":"Auto",
         "Condition":[
          {"Value":"TEST", "Operator":"=", "Host":"TEST"},
          {"Value":"TEST1", "Operator":"=", "Host":"TEST1"}
                  ]
        }
      ]
  </code></pre>