title: How to organize array of dictionaries based on the value of a key within them?
body: <p>I have an array of information stored as follows:</p>
  
  <pre><code>(
              {
          actual = "&lt;null&gt;";
          code = "AUTO.US";
          date = "2019-12-31";
          difference = "&lt;null&gt;";
          estimate = "-0.12";
          percent = "&lt;null&gt;";
          "report_date" = "2020-03-27";
      },
              {
          actual = "&lt;null&gt;";
          code = "APTX.US";
          date = "2019-12-31";
          difference = "&lt;null&gt;";
          estimate = "-0.5600000000000001";
          percent = "&lt;null&gt;";
          "report_date" = "2020-03-30";
      },
  {
  
          actual = "&lt;null&gt;";
          code = "BLAH.US";
          date = "2019-12-31";
          difference = "&lt;null&gt;";
          estimate = "-0.5600000000000001";
          percent = "&lt;null&gt;";
          "report_date" = "2020-03-30";
      }
  );
  </code></pre>
  
  <p>I would like to create an array of dictionaries, a key for each <code>report_date</code> that contains an array of the above dictionaries that match that date. This is what I am trying to accomplish:</p>
  
  <pre><code>(
          {
          "2020-03-27" =         (
                          {
                  actual = "&lt;null&gt;";
                  code = "AUTO.US";
                  date = "2019-12-31";
                  difference = "&lt;null&gt;";
                  estimate = "-0.12";
                  percent = "&lt;null&gt;";
                  "report_date" = "2020-03-27";
              }
          );
      },
          {
          "2020-03-30" =         (
                          {
                  actual = "&lt;null&gt;";
                  code = "APTX.US";
                  date = "2019-12-31";
                  difference = "&lt;null&gt;";
                  estimate = "-0.5600000000000001";
                  percent = "&lt;null&gt;";
                  "report_date" = "2020-03-30";
              },
          {
  
          actual = "&lt;null&gt;";
          code = "BLAH.US";
          date = "2019-12-31";
          difference = "&lt;null&gt;";
          estimate = "-0.5600000000000001";
          percent = "&lt;null&gt;";
          "report_date" = "2020-03-30";
      }
          );
      }
  )
  </code></pre>
  
  <p><strong>For clarification, I want to end up with an array that holds dictionaries with the date as the day, which hold as their object an array of the original dictionaries that have report_date matching that key. So there could be more than one earnings dictionary in the array under the key.</strong></p>
  
  <p>I appreciate any help with this!</p>