Get data from firebase with unique ID


I can access data from firebase, but not in a good way.

service.getData = function(userid) { var ref = new Firebase("https://urlhere" + "users/" ); return $firebaseObject(ref.child(userid)); }

userid is something like this, 700c122a-067d-4a02-baae-f5d12343242

My firebase structure looks like ,

` .controller(‘ProfileCtrl’, function($scope, $rootScope, Auth, $state, $stateParams, firebaseService) {

$scope.userid = $stateParams.userId;
$scope.details = firebaseService.getData($scope.userid);


<p ng-repeat="item in details"> <span>{{item}} </span> </p> </ion-content>

The problem is, it displays all values of keys under Unique ID.
See my result.
I need to get name of user, when {{item.firstname}} in view.