Url api JSON object equal to firebase


#1

hello i try call object from api json and if equal to firebase json display

ionViewWillEnter(){ 
    this.http.get( this.url )
    .map(res => res.json())
    .subscribe(data => {
      this.items = [];
      // we've got back the raw data, now generate the core schedule data
      // and save the data for later reference
     //this.data = data;
      this.items.push(data);
      
     
    });   
    this.postSubscription = this.db.list('/posts',{
    query: {
      orderByChild: 'country',
      equalTo: this.items 
   
    }

#2
ionViewWillEnter(){ 
    this.http.get( this.url )
    .map(res => res.json())
    .subscribe(data => {
      this.items = [];
      // we've got back the raw data, now generate the core schedule data
      // and save the data for later reference
     //this.data = data;
      this.items.push(data);
      
     
    },_=>{},_=>{

this.db.list('/posts',{
    query: {
      orderByChild: 'country',
      equalTo: this.items 
   
    }



});   

You are never calling this.postSubscription. And there is more to ask about your code, but I leave that to others


#3

Thanks i try your code