title: How to access json object in Ionic / Angular
body: <p>I need to access the <code>firstBill</code> value in this json:</p>
  
  <pre><code>[{
      "companyName": "Madrid",
      "producCompanyId": 4,
      "productCompanyName": "Empresa1",
      "state": {
          "id": 5,
          "description": "Completada sin precios"
      },
      "message": "\nHay otra empresa igual en ACTIVO                                              "
  }, {
      "companyName": "Barcelona",
      "producCompanyId": 10,
      "productCompanyName": "Empresa2",
      "companyResultId": "889",
      "state": {
          "id": 4,
          "description": "Completada con precios"
      },
      "prices": {
          "priceList": [{
              "priceId": 699614,
              "companyPriceId": "1091931204",
              "firstBill": 281.96,
              "issuable": true
          }, {
              "priceId": 699609,
              "companyPriceId": "1091931204",
              "firstBill": 251.64,
              "issuable": true
          }, {
              "priceId": 699611,
              "companyPriceId": "1091931204",
              "firstBill": 302.6,
              "issuable": true
          }]
      },
      "message": ""
  }]
  </code></pre>
  
  <p>Now I have this code but with errors because of undefined <code>prices</code> jsonarray in other (the first one of the previous json) objects:</p>
  
  <pre><code>&lt;ion-content class="home"&gt;
    &lt;ion-list&gt;
      &lt;ion-item *ngFor="let oferta of ofertas"&gt;
        &lt;h2&gt;{{oferta.companyName}}&lt;/h2&gt;
        &lt;pre&gt;{{ oferta.prices.priceList[0] ? oferta.prices.priceList[0] | json }}&lt;/pre&gt;
      &lt;/ion-item&gt;
    &lt;/ion-list&gt;
  &lt;/ion-content&gt;
  </code></pre>