UPDATE: As of Firebase 2.0, you can now query based on fields.
There isn't currently a way to pick data out of a path (i.e. filter which fields you get back). The easiest solution here is to store the data in different paths. It greatly simplifies the process.
users/
users/names/fred/first
users/chat_history/fred/...
Another useful approach, particularly when you're going to be using a lot of subsets (e.g. friends list, members of a group, et al) is to use an index.
user_index/group_1/fred
user_index/group_1/mary
user_index/group_2/...
users/fred/name
users/fred/chat_history
Then you can access the data with something like this:
var fb = new Firebase(INSTANCE);
fb.child('user_index').on('child_added', function(ss) {
fb.child('users/'+ss.name()+'/name').once('value', function(nameSnapshot) {
var userName = nameSnapshot.val();
});
});