MongoDB: SELECT the const ?

Is it possible in MongoDB to create a query similar to the SQL version:
SELECT 1 as num, username FROM 'users' LIMIT 1?
(Task: you must specify a value in the query to get it as a result)
October 8th 19 at 01:00
2 answers
October 8th 19 at 01:02
In 2.2 you can use $project. Now this method I don't know. Can you specify the problem? Why get the same pitch as at the entrance.
The application logic is to receive a request from a source to send a database query, put the query result in an array of responses, while retaining the id of the source.
I would like to query the database without losing the id source. - Shanie_Hills commented on October 8th 19 at 01:05
to obtain data from a source, sorry - Shanie_Hills commented on October 8th 19 at 01:08
October 8th 19 at 01:04
Apparently requires a temporary placeholder while designing/development of the project or connect to an existing database, the structure of which is not correct.

Universal solution — make a view in the database, which add the desired fields.
Thank you, will consider - Shanie_Hills commented on October 8th 19 at 01:07

Find more questions by tags MongoDB