I want to create a nested observable to save one content with tag related. First to save content and return content id to save tag with content id as foreign key by the way look like the service send data as the same time in my loop. (backend log run pararel) how can I make it wait until done to do next one 

component.ts

```
save(){
  this.contentService.savecontent(this.content_input) // save content
     .subscribe(
     data => { this.listContentData = data }, // return data to get content id
     error => { error = error },
     () => {
        this.savetag(this.listContentData); // save tag
     });
}

savetag(listcontentdata): void {
   // listdraftCategories is a list of tag
    for (var i = 0; i < this.listdraftCategories.length; i++) {  
        this.tagService.savetagwithcontent(this.listdraftCategories[i], listcontentdata)
            .subscribe(
            data => { data = data },
            error => { },
            () => {
            });
    }
}

```

service.ts

```
savecontent(contentObj: any): Observable<any> {

    contentObj = JSON.parse(contentObj);

    let body = JSON.stringify(

        {
            "token": "test",
            "content": {
                "contentName": contentObj.itemName // contentId will be autoincrement in backend
                }
            }
        }
    );

    let headers = new Headers({ 'Content-Type': 'application/json' });
    let options = new RequestOptions({ headers: headers });

    return this.http.post(this.host + this.url_content + this.url_save, body, options)
        .map(res => this.extractData(res))
        .catch(this.handleError);
}

savetagwithcontent(tagObj: any, contentObj: any): Observable<any> {

    console.log("obj", contentObj);

    let body = JSON.stringify(
        {
            "token": "test",
            "content": {

                "fkTag": {
                    "tagId": tagObj.tagId
                },
                "fkContent": {
                    "contentId": contentObj.responseObject[0].contentId
                }

            }
        }
    );

    let headers = new Headers({ 'Content-Type': 'application/json' });
    let options = new RequestOptions({ headers: headers });

    return this.http.post(this.host + this.url_tag_has_content + this.url_save, body, options)
        .map(res => this.extractData(res))
        .catch(this.handleError);
}

```

backend log (save tag with content)

```
--- start save tag with content ---
--- start save tag with content ---
--- content id : 1 tag id: 1 ---
--- content id : 1 tag id: 2 ---
--- end save tag with content ---
--- end save tag with content ---

```

look like it went in method at the almost same time. how can I manage to make savetag wait for one save complete then do next one ?