What about using some PHP?
usort($data, function($a, $b) {
return strtotime($a['timestamp']) < strtotime($b['timestamp']) ? -1 : 1;
});
If you are getting the data from a database then you should let the database sort it for you. It is a lot faster than doing it yourself.