title: Getting Data from JSON in ionic
body: <p>I am trying to get data from a JSON file in ionic app using.</p>
  
  <pre><code>this.http.get('https://track.delhivery.com/api/packages/json/?token=c7ac81cde31a5ea69d38cb098cab16cf7f909062&amp;waybill=2285210000022').map(res =&gt; res.json()).subscribe(data =&gt; {
                  this.trackingorder = data;
                  console.log(this.trackingorder.ShipmentData);
  </code></pre>
  
  <p>But i am getting error that Shipment is undefined.
  My JSON file is of the format</p>
  
  <pre><code>{
  "ShipmentData": [
      {
          "Shipment": {
              "Origin": "Bengaluru_Bomsndra_PC (Karnataka)",
              "Status": {
                  "Status": "Delivered",
                  "StatusLocation": "Cjb_Kovaipudur_Dc (Tamil Nadu)",
                  "StatusDateTime": "2018-12-20T17:57:28.002000",
                  "RecievedBy": "",
                  "Instructions": "Delivered to consignee",
                  "StatusType": "DL",
                  "StatusCode": "EOD-38"
              },
              "PickUpDate": "2018-12-18T19:44:43",
              "ChargedWeight": null,
              "OrderType": "Pre-paid",
              "Destination": "Coimbatore",
              "Consignee": {
                  "City": "Coimbatore",
                  "Name": "Sayal Krishna",
                  "Country": "India",
                  "Address2": [],
                  "Address3": "",
                  "PinCode": 641105,
                  "State": "Tamil Nadu",
                  "Telephone2": "",
                  "Telephone1": [
                      "8667079713"
                  ],
                  "Address1": [
                      "A-198,\nTamil annai street,Gandhi nagar,madukarai\nCoimbatore 641105"
                  ]
              },
              "ReferenceNo": "5160",
              "ReturnedDate": null,
              "DestRecieveDate": "2018-12-20T07:56:22.518000",
              "OriginRecieveDate": "2018-12-18T23:00:58.874000",
              "OutDestinationDate": "2018-12-19T00:54:18.663000",
              "CODAmount": 0,
              "EWBN": [],
              "FirstAttemptDate": null,
              "ReverseInTransit": false,
              "Scans": [
                  {
                      "ScanDetail": {
                          "ScanDateTime": "2018-12-18T00:33:37.614000",
                          "ScanType": "UD",
                          "Scan": "Manifested",
                          "StatusDateTime": "2018-12-18T00:33:37.614000",
                          "ScannedLocation": "BLR_Kudulu_CP (Karnataka)",
                          "Instructions": "Consignment Manifested",
                          "StatusCode": "X-UCI"
                      }
                  },
  
  
                  {
                      "ScanDetail": {
                          "ScanDateTime": "2018-12-20T17:57:28.002000",
                          "ScanType": "DL",
                          "Scan": "Delivered",
                          "StatusDateTime": "2018-12-20T17:57:28.002000",
                          "ScannedLocation": "Cjb_Kovaipudur_Dc (Tamil Nadu)",
                          "Instructions": "Delivered to consignee",
                          "StatusCode": "EOD-38"
                      }
                  }
              ],
  
          }
      }
  ]
  </code></pre>
  
  <p>}</p>
  
  <p>Please help me get Shipment from this JSON file.
  The exact error I am getting is 
  ERROR Error: Uncaught (in promise): TypeError: Cannot read property 'Shipment' of undefined</p>