title: Define arrays within array in Angular 2 and Typescript
body: <p>In Angular 2 I was wondering if it was possible to define an array that has multiple other arrays in it. It is probably easier to just show what I mean:</p>
  
  <p>I started out using this:</p>
  
  <pre><code>export class PaymentDetails {
       account: any[];
       bpNumber: number;
  }
  </code></pre>
  
  <p>but this gave me the problem that when I populated it I couldn't really access the data in the account array, as I want more arrays inside of it.</p>
  
  <p>So now i would like to define my class like this:</p>
  
  <pre><code>export class PaymentDetails {
      account: [
          debitAccount: [
              {
                  debitAccountId: string;
                  debitBankCode: string;
                  debitBankName: string;
                  debitCountryCode: string;
                  debitAccountNumber: string;
                  debitAccountHolder: string;
                  debitContinous: string;
                  debitDueDate: string;
                  iban: string;
                  bic: string;
              }
          ],
          ccAccount: [
              {
                  ccAccountId: string;
                  ccCompanyCode: string;
                  ccNumber: string;
                  ccStart: string;
                  ccExpiry: string;
                  ccDsbTransactionId: string;
                  ccCardholderName: string
              }
          ]
      ];
      bpNumber: number;
  
  }
  </code></pre>
  
  <p>Is this at all possible? </p>
  
  <p>The class is getting populated with this InMemoryDataService</p>
  
  <pre><code>export class InMemoryDataService {
    createDb() {
  let paymentDetailsDB = [
        {
          account: [
            {
              debitAccount: [
                {
                  debitAccountId: '8736583',
                  debitBankCode: '45345',
                  debitBankName: 'KSK HGTT',
                  debitCountryCode: 'DE',
                  debitAccountNumber: '123453463',
                  debitAccountHolder: 'A Berg',
                  debitContinous: '',
                  debitDueDate: '',
                  iban: 'DE12344235',
                  bic: '324645',
                },
                {
                  debitAccountId: '6567456',
                  debitBankCode: '55463453',
                  debitBankName: 'GRDFE',
                  debitCountryCode: 'DE',
                  debitAccountNumber: '000123492',
                  debitAccountHolder: 'A Berg',
                  debitContinous: '',
                  debitDueDate: '',
                  iban: 'DE43523453',
                  bic: '123547665',
                }
              ],
  
              ccAccount: [
                {
                  ccAccountId: '23413',
                  ccCompanyCode: '254345',
                  ccNumber: '238857827368837',
                  ccStart: '2010-10-05',
                  ccExpiry: '2018-10-05',
                  ccDsbTransactionId: '235231',
                  ccCardholderName: 'Anne Berg',
                }
              ],
            }
          ],
          bpNumber: 4711,
        }
      ];
      return {paymentDetailsDB};
    }
  }
  </code></pre>