title: How can I combine JSON rows in a logic app grouped by another property
body: <p>I have a logic app that is taking failed runs from an app writing to application insights, and I want to group all the errors by the operation name into a single message.  Can someone explain how to do this?  </p>
  
  <p>my starting data looks like:</p>
  
  <pre><code>[{ "messageError": "Notification sent to AppName but not received for request: 20200213215520_hUu22w9RZlyc, user email@email.com Status: NotFound", 
     "transactionKey": "20200213215520_hUu22w9RZlyc"},
   { "messageError": "App to App Import Request: 20200213215520_hUu22w9RZlyc from user email@email.com was unable to insert to following line(s) into App with error(s) :\r\n Line 123: Unable to unlock this record.", 
     "transactionKey": "20200213215520_hUu22w9RZlyc"}]
  </code></pre>
  
  <p>What I am trying to get out of that would be a single row that concatenates both messageError values into one statement on a common transaction key.  Something like this:</p>
  
  <pre><code>[{ "messageErrors": [{"Notification sent to AppName but not received for request: 20200213215520_hUu22w9RZlyc, user email@email.com Status: NotFound"}, 
                       {"App to App Import Request: 20200213215520_hUu22w9RZlyc from user email@email.com was unable to insert to following line(s) into App with error(s) :\r\n Line 123: Unable to unlock this record."}], 
     "transactionKey": "20200213215520_hUu22w9RZlyc"}]
  </code></pre>
  
  <p>There might be as many as 20 rows in the dataset, and the concatenation needs to be smart enough to group only if there are multiple rows with the same transactionKey.  Has anyone done this, and have a suggestion on how to group them?</p>