title: How to add a part of the acquired API to the array defined in component
body: <p>For learning, I am trying to create a simple Todo application using Angular 2 + Django Rest Framework.<br>
  In order to immediately display the items saved in the input form, I want to implement the function of acquiring the latest one and displaying it.<br></p>
  
  <p>JSON format WEB API for acquiring the latest one has the following structure.
  <a href="https://i.stack.imgur.com/HQijN.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/HQijN.png" alt="enter image description here"></a></p>
  
  <p>function for getting this API is described in todo.service.ts</p>
  
  <pre><code>@Injectable()
  export class TodoService {
    todo: Todo[] = [];
    newtodo: NewTodo[] = [];
    private Url = `http://127.0.0.1:8000/api/todo/`
    private headers = new Headers({'Content-Type': 'application/json'});
  
    constructor(
      private http: Http
    ){}
  
    // Acquire one latest todo added
    getNewTodo(): Promise&lt;NewTodo[]&gt; {
      return this.http
        .get(this.Url+"?limit=1")
        .toPromise()
        .then(res =&gt; res.json())
        .catch(this.handleError)
    }
  </code></pre>
  
  <p>Components are described in todo.component.ts</p>
  
  <pre><code>@Component({
    selector: 'todo-list',
    templateUrl: '../templates/todo-list.component.html',
    styleUrls: ['../static/todo-list.component.css']
  })
  export class TodoListComponent {
    todos: Todo[] = [];
    newtodo: NewTodo[] = [];
    newtodos: Todo[] = [];
    @Input() todo: Todo = new Todo();
  
    save(): void {
      this.todoService
        .create(this.todo);
    }
  }
  </code></pre>
  
  <p>The point I want to teach is the following points.<br>
  1.Execute service's getNewTodo () when save () of the component is executed and store the obtained return value in the array <code>newtodo</code>.<br>
  2.Since only the results part is necessary for the acquired JSON, pull out the results part, push it to the array <code>newtodos</code> and pass it to html.<br></p>
  
  <p>For 1, I think that you should write the following description in save ()</p>
  
  <pre><code>this.todoService
    .getNewTodo()
    .then(newtodo =&gt; this.newtodo = newtodo);
  </code></pre>
  
  <p>I can not understand what to write about 2.
  I'd like to tell you how to solve it.</p>