Sorting distance dynamically

I’m trying to use the Google Distance Matrix to dynamically sort specific locations saved in my database based on a location an app user has entered. Finding the distances are no problem. I have a list of locations saved in my DB, I enter a geographic address and in the repeating group of locations, I use the Google Distance Matrix and for each location, I get the distance from a location I dynamically enter. However, now, I’d like to sort the distances in either ascending or descending order. I want to use the Google Distance Matrix plugin, because it gives the distance based on actual driving, walking distances, as opposed to the Bubble native distance calculation which appears to just give straight line distance.

Does anyone know of a plugin or procedure I could use to sort numbers in a repeating group that are not saved in the database, but are calculated dynamically as in the example I gave above?

Thanks


Have a look on this topic