Q:

get data from firestore firebase

i need to get the data of formName and id from the following data Structure in firestore. how to get data in this case like nested objects are created?

A:

Nested values translate to maps in Java, so something like this should to do the trick:
DocumentReference docRef = db.collection("employees").doc("JdkK...");
docRef.get().addOnSuccessListener(new OnSuccessListener<DocumentSnapshot>() {
    @Override
    public void onSuccess(DocumentSnapshot documentSnapshot) {
        Map<String, Object> forms = documentSnapshot.get("dynForms");
        for (Map.Entry<Object, Object> form: forms.entrySet()) {
            String key = (String) form.getKey();
            Map<Object, Object> values = (Map<Object, Object>)form.getValues();
            String name = (String) values.get("formName");
        }
    }
})

