How to pull the data partially from firebase database

前端 未结 1 1277
遥遥无期
遥遥无期 2020-12-12 04:19

I wanna pull whole data from the firebase database and access that without change data.

firebase.database().ref(‘someBigNode’).once(‘value’, (snapshot) =>         


        
相关标签:
1条回答
  • 2020-12-12 04:57

    When you read data from Firebase Database with the JavaScript (or iOS or Android) SDK, it will always read complete nodes. So the only way to retrieve less data is to retrieve a node lower in the JSON tree.

    If you find you need to retrieve a part of each node under someBigNode, you should split that part of each node out into a top-level node of their own importantBitsOfSomeBigNode.

    It's unfortunately hard to be more helpful without a more concrete example of your data structure and the bits you're trying to retrieve (and the reason why those bits are special).

    0 讨论(0)
提交回复
热议问题