title: Create JSON with dynamic key (Progress 4GL)
body: <p>I have a dataset defined for 2 temp-tables linked with some field (lets say : item). For example:</p>
  
  <pre><code>define temp-table items no-undo
    field item as char.
  
  define temp-table customer no-undo
    field item     as char serialize-hidden
    field custname as char
    field price    as dec.
  
  define dataset dsitemcust for items,customer
    data-relation dr1 for items,customer relation-fields(item,item) nested.
  </code></pre>
  
  <p>This gives the json output like this:</p>
  
  <pre><code>{
    "items": [
       {
          "item": "abc_item",
          "customer": [
             {
                "custname": "uvw_cust",
                "price": 123
             },
             {
                "custname": "xyz_cust",
                "price": 234
             }, 
             ....
          ]
       },
       {
          "item": "def_item",
          "custname": [{},{},...]
       }
       ...
       ]
  }
  </code></pre>
  
  <p>But i want to get something like this:
  [<strong><em>item as key</em></strong> and, <strong><em>custname and price</em></strong> as <strong><em>value</em></strong> (in array of object where <strong><em>custnum</em></strong> is key again)]</p>
  
  <pre><code>{ "abc_item" : [{"uvw_cust" : 123}, {"xyz_cust" : 234}, ...],
    "def_item" : [{}, .. ],
    ..
  }
  </code></pre>
  
  <p>Is this possible/achievable in Progress openedge?
  (Progress version: 10.2B)</p>