Workspaces are sent ordered by the server, the function that return the workspaces is list_projects() in ProjectController.
There it is called the function User::getWorkspaces() and this function uses
ProjectUsers::getProjectsByUser().
This last function takes the parameter "order_by", if not passed then name will be used to order. You have to pass your order criteria to this function