I have an array which contains:
[['test3', ['7']], ['test4', ['1']], ['test', ['2', '4']], ['test1', ['2', '4']], ['test2', ['5']]]
I don't know how I can sort this by the length of the second item (= array) in the array of the full array. It should look like this when it is sorted:
[['test4', ['1']], ['test2', ['5']], ['test3', ['7']], ['test', ['2', '4']], ['test1', ['2', '4']]]
It would be also nice if somebody knew how to sort it also by the numbers in the array.
The first item is not relevant.