Order List by more than 1 field in HTML Page

Order List by more than 1 field in HTML Page

Hello,

I have a HTML Page that I am using to generate a report FOR EACH record in my database that match the specified. 

Everything works fine however I am trying to order the list in by "input.Department " AND "input.Last_Name" Please see below

Thank you

  1. PaymentList = PaymentDetails[(((Payroll_Period = input.PeriodID.toLong() && Employee.Type = input.Type) && Employee.Work_Location = input.Location) && Employee.Department = input.Department)].distinct(Employee);  <-------- this is what I need to sort
  2.     for each x in PaymentList
  3.     {
  4. }