code: public static Map.Entry<Object, Object> selectMinKeyValue(AssociativeArray keyValueMap) {
          Double minValue=Double.POSITIVE_INFINITY;
          Object minValueKey = null;
          
          for(Map.Entry<Object, Object> entry : keyValueMap.entrySet()) {
              Double value = TypeInference.toDouble(entry.getValue());
              if(value!=null && value<minValue) {
                  minValue=value;
                  minValueKey=entry.getKey();
              }
          }
          
          return new AbstractMap.SimpleEntry<>(minValueKey, keyValueMap.get(minValueKey));
      }
docs: Selects the key-value entry with the smallest value.
  
  @param keyValueMap
  @return