title: Navigate page upon condition
body: <p>I have to navigate page based upon condition, here I get response from my backend and when I try to evaluate this it behaves continuous looping but not getting exact result. What I did till now is:</p>
  
  <pre class="lang-js prettyprint-override"><code>constructor (public homeauth: Authservice, public navCtrl: NavController) {
    this.accesscheck();
  }
  
  accesscheck() {
    this.homeauth.accesscheck().then(response =&gt; {
      for (var i = 0; i &lt; response.length; i++) {
        if (response[i]["c20"] !== true) {
          this.navCtrl.setRoot("TabsPage");
        }
      }
    });
  }
  </code></pre>
  
  <p>I have response from my backend like this:</p>
  
  <pre class="lang-js prettyprint-override"><code>[
      {
          "c24": true,
          "statuscode": 65544
      },
      {
          "c23": true,
          "statuscode": 4259848
      },
      {
          "c22": true,
          "statuscode": 6357000
      },
      {
          "c21": true,
          "statuscode": 7405576
      },
      {
          "c20": true,
          "statuscode": 7929864
      },
      {
          "c19": true,
          "statuscode": 8192008
      },
      {
          "c18": true,
          "statuscode": 8323080
      }
  ]
  </code></pre>
  
  <p>my backend code something like this
  <a href="https://i.stack.imgur.com/Y0bfG.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Y0bfG.png" alt="enter image description here"></a></p>