swift firebase retrieve all object that the child of the object have the same key
<p>Below is my firebase and code , I would like to retrieve all activities which have the User John key inside User.
<img src="https://imgur.com/oMS9bNP.jpg" alt="ss"></p>

<pre><code>let ref = FIRDatabase.database().reference().child("activities/")
ref.queryOrderedByChild("User").queryEqualToValue("John").observeSingleEventOfType(.Value,
        withBlock:{
            (snapshot) in

            for record in snapshot.children
            {

            }
       })
</code></pre>