firestation
firestation copied to clipboard
Filter by a nested "keys"?
Hey, thanks for this great visualization tool.
Sorry if this is a stupid question but, I'd like to query by a unknown "key". I have the following structure (not my actual use-case).
{
'users':
{
'7894hut988g3':
{
'username': 'jack'
}
'jhbsfbhsfa989':
{
'username': 'jimbo'
'friends':
{
'bfhbsjfs87878':
{
'username':'jack'
}
}
}
}
}
And I would like to do something like:
select * from users.$.friends.$.username = 'jack'
Where $ is it's unknown value/key. Right now I can only get:
select * from users where friends != null
to work
I don't think this is supported at the moment, but I can't totally remember. Sorry, I haven't worked on this project in a while.
You could try something like:
select * from (select friends from users) where username = 'jack';
I think I have that type of nested query working on the projectRevamp branch. You could follow the instructions to launch that locally from that link and give it a shot. Good luck!
Thanks Joe, I will try it out later! In-case you know off the bat, do you think this is available for Fire base (noticed that the new topic talks alot about Fire store)?
EDIT:
Didn't seem to work, it doesn't recognize the nested query. It thinks that the table is named select
and looks into that.
Ah, okay, sorry! The next time I work on this I'll see if I can get a query like that working.