Hii... Everyone , I am using Angular4. I have to map 2 json file objects
based on the key and stored into a third object. All other operations
are performed based on these third object.
import { Injectable } from '@angular/core';
import { Http, Response, Headers, RequestOptions } from '@angular/http';
import { Observable } from 'rxjs/Rx';
//import { parse } from '@types/parse';
import 'rxjs/add/operator/map';
import 'rxjs/add/operator/zip';
import 'rxjs/add/operator/toPromise';
import { map } from 'rxjs/operator/map';
import { parse } from 'querystring';
@Injectable()
export class SettingsService {
// public ah: Object;
// public obj1: string;
public obj1
public obj2
.map(response => { this.obj1 = response.json()
})
.zip(
.map(response => { this.obj2 = response.json()
this.serve(this.obj1,this.obj2);
}))
serve(obj1,obj2){
for(let i in obj1){
///
HOW CAN I MAP THESE TWO JSON OBJECTS INTO ONE BY JOINING TOGETHER WITH THE CORRESPONDING MediaKeySession
//
}
}
constructor(private http : Http) {
}
getData(): Promise<any>{
return this.data.toPromise();
}
}