Firebase is a data structure problem for retrieving an object from a nested structure.
I want to find the uid and then check if the key is jobId. I have designated accordingly below.
I am using typescript and angular2 with firebase.
This is my current attempt, which returns "null":
var jobId = "-K5fIAiuHM-4xeEQJiIS"; var uid = "3f61ae7a-99a1-4cbf-9c8e-00b2249956a7"; var userRef = this.refApp.child('key').child(uid); var query = userRef.child('jobId').child(jobId); query.on('value', (snap) => {
This is my database structure:

source share