I have this data structure, where todos are organized to follow path /todos/uid/
{
\"metausers\" : {
\"simplelogin:1\" : {
\"displayName\" : \"Jo
Assuming you have the uid, this should be straightforward with the following:
var uid = "simplelogin:1";
var todosRef = new Firebase("https://yourdb.firebaseio.com/todos/" + uid);
var privateTodosRef = todosRef.orderByChild("private").equalTo(true);
var privateTodos;
privateTodosRef.on("value", function(response) {
privateTodos = response.val();
});
This should return an object with all of this user's private todos, organized by their todo key (ie "-JUAfv4_-ZUlH7JqM4WZ". If you'd like to use Angularfire you can wrap this in a $firebaseArray and assign it as follows:
$scope.privateTodos = $firebaseArray(privateTodosRef);
Here's a reference for more info on complex queries, and as mentioned in the other responses there are some nice optimizations that can be done with priorities and restructuring.
Happy coding!