I have multiple root nodes and security rules for all those nodes are same as follows
".read": "auth.uid == uid"
".write": "auth.uid == uid"
Instead of repeating the same code again and again how to merge this following code?
{
"rules": {
"node_1": {
"$uid": {
".read": "auth.uid == uid"
".write": "auth.uid == uid"
}
},
"node_2": {
"$uid": {
".read": "auth.uid == uid"
".write": "auth.uid == uid"
}
},
"node_3": {
"$uid": {
".read": "auth.uid == uid"
".write": "auth.uid == uid"
}
}
}
}
fetchUserProfile = FirebaseDatabase.getInstance().getReference( Constants.FB_PROFILE_INFO ).orderByKey().equalTo( mAuth.getUid() );