Adds switch statement for parsing MongoDB query output