MongoDB Java nested documents not accessible using dots in key name
问题 When using the MongoDB API in Java, I am trying to retrieve the value of two in a document that looks like this: data-id: "1234" one: two: "three" And I am running this: MongoCollection<Document> documents = ...; Document document = documents.find(Filters.eq("data-id", "1234")).first(); // Not null document.get("one"); // Not null document.get("one.two"); // This is null ((Document) document.get("one")).get("two"); // Not null After spending some time reading documentation and other Stack