Lo-dash sort array of objects based on string value
<p>Let's say that I have an array of objects like so</p>

<pre><code>var outer = [
  {
    "name": "T1",
    "inner": [
      {
        "type": "DAY"
      },
      {
        "type": "MONTH"
      },
      {
        "type": "WEEKLY"
      }
    ]
  },
  {
    "name": "T2",
    "inner": [
      {
        "type": "DAY"
      },
      {
        "type": "MONTH"
      },
      {
        "type": "WEEKLY"
      }
    ]
  }
];
</code></pre>

<p>I'm basically trying to sort the objects in the inner array so that the 'type' is in this order - MONTH, WEEKLY, DAY. Like this.</p>

<pre><code>"inner": [
          {
            "type": "MONTH"
          },
          {
            "type": "WEEKLY"
          },
          {
            "type": "DAY"
          }
        ]
</code></pre>

<p>Is there a way to do this using Lo-dash? Here's a <a href="https://jsfiddle.net/2g70o0yd/" rel="nofollow noreferrer">small fiddle</a> for this.</p>

<p>I saw a <a href="https://stackoverflow.com/questions/33234246/sort-array-of-objects-based-on-string">similar question here</a>, but this is not exactly what I was looking for because in my case, the order will be fixed, and sort will not be based on a random string value.</p>