sorting elements in a javascript multidimensional array
<p>Doing some work in javascript
I have a multidimensional made up in this format ( I know it’s not an actually array object, bit it gives you an idea of the format</p>

<pre><code>[
  [[“ip-address”][timestamp]],
  [[“ip-address”][timestamp]],
  [[“ip-address”][timestamp]],
  [[“ip-address”][timestamp]]
]
</code></pre>

<p>The array can include duplicate ip addresses and I need a way to first sort the array by timestamps and then echo out the first instance of the ip address (i.e. for each ip address I need the one with the earliest timestamp)</p>

<p>For example</p>

<pre><code>[[“10.0.0.1”][13:01:34]]
[[“10.0.0.1”][ 13:21:56]]
[[“192.168.1.1”][23:45:12]]
[[“192.168.1.1”][12:34:42]]
</code></pre>

<p>Would give me the following output</p>

<pre><code>10.0.0.1 = 13:01:34
192.168.1.1 = 12:34:42
</code></pre>

<p>I’ve had a hunt around and can’t see a way to do this so any help would be appreciated</p>
