title: How to sort by Datetime in Mulesoft Dataweave?
body: <p>How do I sort and array of json that needs sorting by date using Dataweave 2</p>
  <pre><code>{
   &quot;things&quot;: [
    {
      &quot;datetime&quot;: &quot;2020-11-07T16:11:52.866Z&quot;,
      &quot;name&quot;: &quot;foo&quot;
    },
    {
      &quot;datetime&quot;: &quot;2020-11-07T16:11:39.971Z&quot;,
      &quot;name&quot;: &quot;bar&quot;
    },
    {
      &quot;datetime&quot;: &quot;2020-11-07T16:11:39.978Z&quot;,
      &quot;name&quot;: &quot;baz&quot;
    }
   ]
  }
  </code></pre>