code: function _mergeManyQueryJSONs(jsonArray) {
      if (!jsonArray.length || jsonArray.length == 1) return jsonArray;
  
      var merged = jsonArray[0];
      var residues = [];
      var mergedResult;
      for (var i = 1; i < jsonArray.length; ++i) {
          mergedResult = _mergeQueryJSONs(merged, jsonArray[i]);
          merged = mergedResult[0];
          if (mergedResult.length == 2) residues.push(mergedResult[1]);
      }
      // merge the residues recursively
      residues = _mergeManyQueryJSONs(residues);
      // done. Add merged as first, and return.
      residues.unshift(merged);
      return residues;
  }
docs: Merges all query JSONs as much as possible, and returns
  the merged and optionally the residual JSONs in an
  array.
  <p>Merging happens recursively across field values.
  @param {Array.<{}>} jsonArray Array of JSONs to be
  merged.
  @return {Array.<{}>} Array of JSONs, where the first
  entry is the merged JSON, and the remaining optional
  JSONs are residues that have at least field common,
  but with a different value that could not be merged.
  @private