I have the following structure in my Javascript which then outputs Json:
request.on('row', function(columns) {
        trans.push({
          key : columns[0].value,
          value :columns[1].value,
          locale : columns[2].value
        });
    });
The current format which it creates:
 {
  "key": "keyname1",
  "value": "some value in here",
  "locale": "ar_AE"
 },
 {
  "key": "keyname2",
  "value": "some value in here",
  "locale": "ar_AE"
 }
But would like the structure of the json to be like the following:
{
  "keyname1": {
  "value": "some value in here",
  "locale": "ar_AE"
},
  "keyname2": {
  "value": "some value in here",
  "locale": "ar_AE"
 }
Seem to be a bit stuck on how to this, can anyone help??
 
    