In my database, I have a collection called Meteor.users. Each user in this collection has an attribute named “lastQuestionAnswered”, which stores the questionId of the last question they answered.
{ "_id" : "jrCJiuo7eprNFKfLG",
"name" : "Elon Musk",
"lastQuestionAnswered" : 1 }
I need to figure out how to retrieve the value of the lastQuestionAnswered attribute for the current user and store it in a variable. The goal is to have
Var lastAnsweredQuestionId = ???
I am attempting to do this on the server-side. I have researched similar questions but haven't found any helpful clues. Any assistance you can provide would be greatly appreciated. Thank you in advance.