Ionic with firebase: checking if data is exits or not

Hello everybody, I don’t have really a problem I just want to ask about “checking if data exits or not” with firebase, because I was searching about that for the last three days and I couldn’t found any real answers … my app is app for chating so if the user want to enter to any room he shoud type the the key for this room …I want my app check in firebase database if there are a room with this key or not, think you for your attention.