I get document with FindOne()
This is how document is presented in the golang:
map[
_id:ObjectID("12")
chatID:12
expenses:[
map[amount:12 category:food]
map[ amount:14 category:food]]
income:[]]
This is how in MongoDB Atlas:
{"_id":{"$oid":"12"},
"chatID":{"$numberInt":"12"},
"expenses":[
{"category":"food","amount":{"$numberDouble":"12.0"}},
{"category":"food","amount":{"$numberDouble":"14.0"}}],
"income":[]}
How to work with each line separately? For example, how to print category and amount of every expense?