i have multiple array of name invite which contain user object ,now i have to sort invite array on the basis of user length
{ "_id": ObjectId("5cc00870e273d731b779ff1d"),
"invite":[ { "_id" : ObjectId("5cc00870e273d731b779ff1d"), "userId" : "5cbda29aae003b18b03acb52" }, { "_id" : ObjectId("5cc00870e273d731b779ff1d"), "userId" : "5cbda29aae003b18b03acb52" } ]},
{
"_id": ObjectId("5cc00860e273d731b779ff1d"),
"invite":[ { "_id" : ObjectId("5cc00870e273d731b779ff1d"), "userId" : "5cbda29aae003b18b03acb52" }, { "_id" : ObjectId("5cc00870e273d731b779ff1d"), "userId" : "5cbda29aae003b18b03acb52" }, { "_id" : ObjectId("5cc00870e273d731b779ff1d"), "userId" : "5cbda29aae003b18b03acb52" }]
}