I have this node where preferences is an object:
I would create a query: I would get only users that they have cinema as a preference. I try this code:
var ref = new Firebase("https://event-application.firebaseio.com/users");
$scope.pref = "Cinema"
var user = $firebaseArray(ref.orderByChild("preferences").equalTo($scope.pref));
But i get this problem: angular.js:12416 Error: Query: First argument passed to startAt(), endAt(), or equalTo() cannot be an object.
How can i fix it please.