I am new to Casbah and scala. How can i access nested document in scala? I have few fields defined here and as you can see Currency and Ratios are nested document. When I am trying to print Currency.ExchangeCCY it gives me an error. How can i get specific value value rather than whole of nested object?
val query = MongoDBObject("RunDate" -> "18-02-2015")
val fields = MongoDBObject("Currency.ExchangeCCY" -> 1,
"Currency.MarketCapCCY" -> 1)
for (d <- price.find(query,fields)) println(d("Currency"))
//> { "ExchangeCCY" : "CAD" , "MarketCapCCY" : "CAD"}
//| { "ExchangeCCY" : "CAD" , "MarketCapCCY" : "CAD"}