How can I use a $in query to make the data returned by mongodb consistent with the order in which I entered it?

for example, the order in which I typed is {id: {$in: [1pg4]}}, how can I make the results returned by mongodb return the corresponding data in this order?

Mar.30,2021

what a strange requirement.
now that you know in advance what rules to sort by. Find the data and sort it in the application.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b385f7-2b886.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b385f7-2b886.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?