code: function (arr) {
      var jsonData = {};
      _.forEach(arr, function (elem) {
        var keys = Object.keys(elem);
        _.forEach(keys, function (key) {
          var value = elem[key];
          jsonData[key] = value;
        });
      })
      return jsonData;
    }
docs: a helper function to convert an array to json object