How do I access the iddoFeed and get all data independent of the logged in user

Asked

Viewed 61 times

0

firebase.database().ref('feeds').once('value').then((snapshot) => {            
        let feeds = []
        snapshot.forEach((childItem) => {
            feeds.push({
                key: childItem.key,
                id: childItem.val().id,
                id_user: childItem.val().id_user,
                url: childItem.val().url,
                date_posted: childItem.val().date_posted,
                name: childItem.val().name,
                avatar:childItem.val().avatar,
                like_count: childItem.val().like_count,
                is_liked: childItem.val().is_liked,
                //comments: childItem.comments
            })
        })

The search I’m doing is returning id_user

1 answer

0

SE6

firebase.database().ref('feeds').once('value').then(snapshot =>
    snapshot.map(s => console.log(s.id_user))
)
  • Actually I need to access the iddoFeed node and fetch all the data from the user-independent feed.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.