I am working in MEAN STACK application.
I can not make mongoose query in mongoose like as MYSQL Query which is given bellow
SELECT _id, username
FROM user
ORDER BY FIELD(_id, "575123d687ed49be12404584", "575123d687ed49be12404587", "572d8b5aab1db7e1160a273a", "575123d687ed49be124045a5")
From this I want to get out put in following order using mongoose
first document (record) -> 575123d687ed49be12404584
second document (record) -> 575123d687ed49be12404587
third document (record) -> 572d8b5aab1db7e1160a273a
fourth document (record) -> 575123d687ed49be124045a5
remaining are in ascending order.
can any one give me a proper solution to get result in give ORDER BY.