I have an array like this.
var word_list = [
    {text: "Lorem", weight: 13},
    {text: "Ipsum", weight: 10},
    {text: "Dolor", weight: 9},
    {text: "Sit", weight: 8},
    {text: "Amet", weight: 6},
    {text: "Consectetur", weight: 5}
];
How can I sort this with "text" or "weight".
 
    