I am having Nodejs model,
itemModel.find({deleted:false},function(error,response){
});
// here i am getting response,
[{_id:'3221xxx',status:"b"},
{_id:'3221xxx',status:"a"},
{_id:'3221xxx',status:"d"},
{_id:'3221xxx',status:"c"}
]
// I have rule in array e.g: ['a','b','c','d']
in this order, i have to list the data based on this array. like this,
[{_id:'3221xxx',status:"a"},
{_id:'3221xxx',status:"b"},
{_id:'3221xxx',status:"c"},
{_id:'3221xxx',status:"d"}
]
Please help me the better & easy way