3👍
✅
That postsRef
returns a Reference to the Query’s location.
You have methods on that ref to extract the right data.
Check the firebase api, there are a few examples there: https://firebase.google.com/docs/reference/js/firebase.database.Reference#key
You might want to try postsRef.toJSON()
to get the JSON object you need.
Source:stackexchange.com