Finally found how to solve:
· Create A BsonDocument object.
· Get the BsonValue to evaluate.
· check if is an Array.
Example:
BsonDocument myBson= myDocuement.toBsonDocument(BsonDocument.class, MongoClient.getDefaultCodecRegistry());
BsonValue myBsonValue= myBson.get("skill");
if (myBsonValue.isArray()) {
System.out.println("Hello!");
} else {
System.out.println("Bye!");
}
If there is any faster method please message me, and thanks in advance.
El dimecres, 13 juliol de 2016 10:40:06 UTC+2, Oscar themacboy va escriure: