Question: Im trying to display the results from the json response from the server on my page, but some variables are displaying as NaN?

This is my json response from the server:

```
{"data":[{"id":"2","attributes":{"title":"Customer 1","status":"cancelled","end-date":"2019-01-01"}}]}

```

My customer service:

```
getCustomers(): Observable<Customer[]> {
        return this.http.get<Customer[]>(this.url);
    }

```

My customer component:

```
    getCustomers(): void {
        this.customerService.getCustomers()
          .subscribe(cs => {
              this.customers = cs;
              //console.log(this.customers);
          });
    }

```

My customer html:

```
        <tr *ngFor="let customer of customers.data">
            <td>{{ customer.id }}</td>
            <td>{{ customer.attributes.title }}</td>
            <td>{{ customer.attributes.status }}</td>
            <td>{{ customer.attributes.end-date }}</td>
        </tr>

```

This displays title and status but not end-date...? end-date returns NaN. Im guessing it is the "-" thats messing this up? How can I solve this?

Answer: 
Dashes are not allowed in Typescript/JavaScript identifiers, you will have to use array syntax to get the end date.

```
<td>{{ customer.attributes["end-date"] }}</td>

```
You need handle the data first.

```
let date = new Date('2019-01-01');

```