From: Paul Date: 2010-09-23T07:35:09+09:00 Subject: Sorting problem with an Array of Arrays Hi there, I have an array of arrays that looks like the following: arr1 = [["ABC-1", 1271768400, 2], ["ABC-2", 1271773800, 1], ["ABC-3", 1271863200, 2], ["ABC-4", 1271869200, 2], ["AAA-1", 1271862000, 2], ["DEF-1", 1271772000, 1]] Desired sort order: (1) label (1st element = all unique) (2) different labels (e.g. AAA, DEF) need to be inserted according to timestamp (2nd element), but maintain (1) label sort order; so AAA-2 can't come before AAA-1. (I don't have that data point here but it happens) => I don't know how to do (2), so I just have the AoA sorted by (1) right now. Is there a way to do this? I'm trying to find duplicate and overlapping timestamps but my current method for checking this is getting complicated, so I thought I'd check to see if there's a good way to sort the data properly in the first place. TIA.