cursor = db.students.aggregate([{'$unwind': '$items'}, {'$match': {
    'items.color': 'green'}}, {'$group': {'_id': '$_id', 'minitem': {'$min':
    '$items.item'}}}])
MongoDB: Find the minimum element in array and delete it