3

MongoDB からの結果を Map に入れる必要があります。私のコードは

DBCollection collection = db.getCollection("template");
DBCursor cursor = collection.find(allQuery, removeIdProjection); 
DBObject resultElement = null;
resultElement = cursor.next();

結果のJsonは次のとおりです。

{ "GraphLabel" : "作業指示書の量" , "XaxisLabel" : "2012" , "YaxisLabel" : "volume(k)" , "ShowLegend" : "FALSE" , "query" : "select sd.season_id,sd .season, count(fsf.defect_type_id) from m2m.season_dim sd ,m2m.field_service_fact fsf where fsf.season_id = sd.season_id group by sd.season_id"}

MAPまたはPOJOで値を入力する必要があります..誰か助けてもらえますか?

4

2 に答える 2