This is an issue I've run into a couple of times and had to create work-arounds for, and I'm wondering if there's not something I'm missing?
I'm aware that you can sort a list normally via:
However, sometimes you'll have multidimensional lists, and it'd be nice to be able to sort all of the lists based on the values held in one. For example:
{warps::names::*} contains the name of each warp.
{warps::visitors::*} contains an integer.
Is it possible to sort both lists by the values in "visitors?"
For example, if it were unsorted:
Sorted by "visitors":
I'm aware that you can sort a list normally via:
code_language.skript:
set {warps::*} to sorted {warps::*}
However, sometimes you'll have multidimensional lists, and it'd be nice to be able to sort all of the lists based on the values held in one. For example:
{warps::names::*} contains the name of each warp.
{warps::visitors::*} contains an integer.
Is it possible to sort both lists by the values in "visitors?"
For example, if it were unsorted:
{warps::names::1} - "World"
{warps::visitors::1} - 12
{warps::names::2} - "Hello"
{warps::visitors::2} - 15
{warps::names::3} - "Wow!"
{warps::visitors::3} - 52
Sorted by "visitors":
{warps::names::1} - "Wow!"
{warps::visitors::1} - 52
{warps::names::2} - "Hello"
{warps::visitors::2} - 15
{warps::names::3} - "World"
{warps::visitors::3} - 12