How to sort a JSON file with more than one argument numerical : Well,I need to create a function to my web application. This function receive as parameter a jSON and return the organized list from lowest to highest. The object of my json file have two parameters to analyse.

    var medicines = [
      {type:"Glibenclamida 5 mg", hour1:2, hour2: 4},
      {type:"Noretisterona 0,35 mg", hour1:4, hour2: 8},
      {type:"Glibenclamida 99 mg", hour1:8, hour2: 16}
    ];

So,this is only a example and I need these list return...

    1: hour 2- Glibenclamida 5 mg
    2: hour 4- Glibenclamida 5 mg, Noretisterona 0,35 mg
    3: hour 8- Noretisterona 0,35 mg, Glibenclamida 99 mg
    4: hour 16 - Glibenclamida 99 mg


This is just  a example I need a organized list  like these.