One solution that comes to my mind is you can get all the objects in the particular node at firebase. add those objects one by one in some Data structure. then you can add a random number generator logic for generating index and fetch the record at that index from your data structure. Thanks