screenshot: [![enter image description here](https://i.stack.imgur.com/A5pZh.png)](https://i.stack.imgur.com/A5pZh.png)Assume we have the following data in the Database:

```
"name": {
     "lastName": { "Markis" 
               "PopMal" 
               "Carlos"
       }
 }

```

And our code is:

```
        final DatabaseReference ref = FirebaseDatabase.getInstance().getReferenceFromUrl("https://myproj.firebaseio.com/");

        DatabaseReference users = ref.child("name");
        users.addListenerForSingleValueEvent(new ValueEventListener() {
            @Override
            public void onDataChange(DataSnapshot snapshot) {
                if (snapshot.child(lastName).exists()) {
                    System.out.println("last name exists");
                }
                else
                {
                    System.out.println("does not exist");
                }
            }

            @Override
            public void onCancelled(DatabaseError databaseError) {

            }
        });

```

My question is how Do I check if 'Carlos' exists?