code: public static AssociativeArray sortAssociativeArrayByValueAscending(AssociativeArray associativeArray) {
          ArrayList<Map.Entry<Object, Object>> entries = new ArrayList<>(associativeArray.entrySet());
          Collections.sort(entries, (Map.Entry<Object, Object> a, Map.Entry<Object, Object> b) -> {
              Double va = TypeInference.toDouble(a.getValue());
              Double vb = TypeInference.toDouble(b.getValue());
              return va.compareTo(vb);
          });
          
          AssociativeArray sortedAssociativeArray = new AssociativeArray();
          for (Map.Entry<Object, Object> entry : entries) {
            sortedAssociativeArray.put(entry.getKey(), entry.getValue());
          }
          
          return sortedAssociativeArray;
      }
docs: Sorts by Value a Associative Array in ascending order.
  
  @param associativeArray
  @return