I have an events node, where each event has a queue full of objects with specific keys. I am trying to use my server to get the keys of all events where a queue contains a specific key, ordered by time. This is my data structure:
{
    "events" : {
        "6Pl5x3KrDgOPxwEQq5yD" : {
            "queue" : {
                "aIcQtBOGP4eAgZvxh0emaHGCMNf1" : {
                    // Details
                },
                // More queuers
             }
        },
        "08Gnr1pbCQETXeRyRG349" : {
            "queue" : {
                "8Gnr1pbCQETXeRyRG349" : {
                    // Details
                },
                // More queuers
             }
        }
    }
}
So if I was searching for all events whose queue contained the key aIcQtBOGP4eAgZvxh0emaHGCMNf1 in the data above, I would retrieve back 6Pl5x3KrDgOPxwEQq5yD.
How can I do that using Node.js?
 
    