# mapEntryValues<K, V> static method

ConvertingComparator<MapEntry<K, V>, V> mapEntryValues<K, V>(

1. Comparator<V> comparator

)

Creates a comparator that compares MapEntry objects by their values.

### 🔧 Example:

    final entries = [
      MapEntry('a', 3),
      MapEntry('b', 1),
      MapEntry('c', 2),
    ];
    entries.sort(ConvertingComparator.mapEntryValues((a, b) => a.compareTo(b)));
    // Sorted by value: 1, 2, 3

## Implementation

    static ConvertingComparator<MapEntry<K, V>, V> mapEntryValues<K, V>(Comparator<V> comparator) {
      return ConvertingComparator<MapEntry<K, V>, V>(comparator, _MapEntryValueConverter<K, V>());
    }