sort array of objects by it's string value : <p>I have this object</p>

<pre><code>var obj = [
    {id: 31, name: "Tiebreak 1", type: 2},
    {id: 32, name: "Tiebreak 2", type: 2},
    {id: 25, name: "Set 1", type: 0},
    {id: 33, name: "Tiebreak 3", type: 2},
    {id: 26, name: "Set 2", type: 0},
    {id: 34, name: "Tiebreak 4", type: 2},
    {id: 35, name: "Tiebreak 5", type: 2},
    {id: 27, name: "Set 3", type: 0},
    {id: 28, name: "Set 4", type: 0},
    {id: 29, name: "Set 5", type: 0}
]
</code></pre>

<p>How can I sort it like this?</p>

<pre><code>var obj = [
    {id: 25, name: "Set 1", type: 0},
    {id: 31, name: "Tiebreak 1", type: 2},
    {id: 26, name: "Set 2", type: 0},
    {id: 32, name: "Tiebreak 2", type: 2},
    ...
]
</code></pre>
