Product collection includes price field. Price field can be a single or multivalued.
Output should be maximum price value.
Input:
{
"_id": ObjectId("5b239304c70f3826b2862f83"),
"price": ["09.8", "90.86"]
} {
"_id": ObjectId("5b239304c70f3826b2862f84"),
"price": ["100"]
} {
"_id": ObjectId("5b239304c70f3826b2862f85"),
"price": "95"
}
output:
{ "price": "100" }