mongodb get nested object and get selected field code example Example: mongo query nested value db.messages.find( { 'headers.From': "[email protected]" } )