2017-09-20 29 views
0

For the image click here: JSON Image 我得到了一個像這樣的JSON,我試圖只得到一個'naamKort'等於'NEC'的結果。AngularFire2查詢

我目前得到這個:

getData(onUpdate) { 
     this.db.list('/sndata/wedstrijden', { 
      query: { 
       orderByChild: 'teamThuis'.'naamKort', 
       equalTo: 'NEC', 
      } 
     }).subscribe((data) => { 
      onUpdate(data); 
      this.gamesObservable.emit(data); 
     }); 
    } 

orderByChild: 'teamThuis'.'naamKort',不起作用。所以我不確定如何正確使用等於當值是在一個不同的值。如果我做了一個查詢讓我們說'tijd'等於'20:30'它工作正常。

回答

0

找到它。 顯然我需要使用:

orderByChild: 'teamThuis/naamKort',