I know its not the right place to ask this question but maybe here i can find some solution,
I am just Stucked @ friend system using Angularfire2 especially how to find my friends status whether they online or offline
My Db is like
Profile-
MARIO:
name: mario
friends:
PRINCE: true
status:online
PRINCE:
name:prince
friends:
MARIO : true
status:offline
Now I want to find profile array to check if my Key exists on their friends objects return all those lists
So i can ngFor those value and view it on the UI
Using map Operator
let key = MARIO
this.Online = this.af.list('profile').map( USERS => {
But the problem is The code is not working i know something wrong here , It would be great If any 1 can give me a solution to this !
Or I need to Approach it differently ?
I know its not the right place to ask this question but maybe here i can find some solution, I am just Stucked @ friend system using Angularfire2 especially how to find my friends status whether they online or offline
My Db is like
Profile- MARIO: name: mario friends: PRINCE: true status:online
Now I want to find profile array to check if my Key exists on their friends objects return all those lists So i can ngFor those value and view it on the UI
Using map Operator let key = MARIO this.Online = this.af.list('profile').map( USERS => {
const Filter = USERS.filter( PROFILE => PROFILE.friends == key) ) return Filter
} )
this.Online.subscribe( RES => console.log( RES) )
But the problem is The code is not working i know something wrong here , It would be great If any 1 can give me a solution to this ! Or I need to Approach it differently ?