title: Postgres convert Select statement output into an array
body: <p>I'm running a select statement with 4 columns as the output. Is it possible to group them as a array of dictionaries? </p>
  
  <p>This is my statement:</p>
  
  <pre><code>select users.id as user_id,
         subscriptions.id as subscription_id,
         subscriptions.latest_receipt as receipt,
         users.status as users_status 
  from users,subscriptions 
  where users.subscription_id = subscriptions.id;
  </code></pre>
  
  <p>I can use an array_constructor for the array. I'm trying to consolidate each output as a dictionary and add it to the array. </p>
  
  <p>Desired output would be:</p>
  
  <pre><code>[{'userid':'1','subscriptionid':'18783278237','receipt':'3AHD83...KJ$@','status':'2'},{'userid':'2','subscriptionid':'18233273435','receipt':'3HJSD3...K*&amp;#K','status':'2'}]
  </code></pre>