sort static method

Map<String, Object> sort(
  1. Map<String, int> fields
)

Implementation

static Map<String, Object> sort(Map<String, int> fields) {
  return {
    '\$sort': {
      ...fields,
    }
  };
}