Q:

Typesctript: Extracting multiple arrays from complex payload

I am new to Typescript but it seems like getting multiple arrays from a json payload should be much easier than I perceive.  What is the right methodology?  Thanks Mike.
From this code I would like to extract both Customer and records in respective arrays

 this.httpReturn = this.http.post<any>('http://localhost:8400/DynAPI/web/Qry/CustomersQry', 
                                        PostData,  
                                        { headers: requestHeaders, observe: "response"}
                                        ).subscribe ((resp: HttpResponse<any>) => {   

resp.body:
{
  "RequestIO": {
    "Customer": [
      {
        "ID": 37,
        "Country": "Austria",
        "Name": "Abc Mountain Bikes",
        "Address": "Alttorstr. 23",
        "City": "Salzburg",
        "State": "West"
      },
      {
        "ID": 1020,
        "Country": "USA",
        "Name": "Abc Sports II",
        "Address": "3233 Pine St",
        "City": "Newtown",
        "State": "CA"
      }
    ],
    "Records": [
      {
        "Count": 2
      }
    ]
  }
}

A:

You don't need to add the observe: "response" field to the request if you are only interested in the body of the response.
You can first create interfaces or class definitions for the payload. The interface examples below are based on the json you posted, which you may or may not want to change the names to better suit your needs.
export interface Customer {
  ID: number;
  Country: string;
  Name: string;
  Address: string;
  City: string;
  State: string;
}

export interface Record {
  Count: number;
}

export interface RequestIO {
  Customer: Customer[];
  Records: Record[];
}

export interface CustomersQryResponse {
  RequestIO: RequestIO;
}

Then all the data binding should be automatic for your request.
this.http.post<CustomersQryResponse>(
  'http://localhost:8400/DynAPI/web/Qry/CustomersQry',
  PostData
).subscribe(resp => {
  console.table(resp.RequestIO.Customer);
  console.table(resp.RequestIO.Records);
});

