I am analysing log files and I'd like to make it easier to read by sorting the requests by descending order. The problem is that I have a two dimensional array with an object in each, I want to sort the arrays by one of their object property (Average response time here) and I don't know how to access to it...
Here is a piece of the final log file for you to understand:
[
[
{
"Request": "/sql/sqlweb/",
"Average response time": "2.685 ms",
"Number of calls": 1
}
],
[
{
"Request": "/",
"Average response time": "1.219 ms",
"Number of calls": 2529
}
],
[
{
"Request": "/mysql/admin/",
"Average response time": "4.086 ms",
"Number of calls": 1
}
],
[
{
"Request": "/mysql/sqlmanager/",
"Average response time": "2.774 ms",
"Number of calls": 1
}
],
[
{
"Request": "/phpmyadmin/",
"Average response time": "2.417 ms",
"Number of calls": 2
}
]
]
This is after a JSON.stringify() on my array. I can also copy/paste the current version of my code if you need it.
Ps: I can easily remove the "ms" if it helps.