function _organizeDataBySource(results) {
    let rv = {};
    results.forEach(result => {
      // Correctly formatted result object with all relevant information
      if (typeof result == 'object' && typeof result.sourceID == 'string' &&
        typeof result.data == 'object') {
        // Initialize array if needed
        if (!Array.isArray(rv[result.sourceID]))
          rv[result.sourceID] = [];

        // See above on why this array is in reverse order
        rv[result.sourceID].unshift(result.data);
      }
    });
    return rv;
  }
/**
   * Put valid data from results array into an object with sourceID as
   * the key and data as a reverse-order array. There may be multiple
   * URLs from one source, assigning value to the same field. URLs earlier
   * in the original thing.urls array take priority, so we have to ensure
   * they come last.
   *
   * @param {Object[]} results
   *  results from multiple adapters
   * @returns {Object}
   *  key = source, value = array of data objects
   * @memberof Thing
   * @inner
   * @protected
   */
Put valid data from results array into an object with sourceID as
the key and data as a reverse-order array. There may be multiple
URLs from one source, assigning value to the same field. URLs earlier
in the original thing.urls array take priority, so we have to ensure
they come last.


Put valid data from results array into an object with sourceID as the key and data as a reverse - order array . There may be multiple URLs from one source assigning value to the same field . URLs earlier in the original thing . urls array take priority so we have to ensure they come last .
function _organizeDataBySource(results) {
    let rv = {};
    results.forEach(result => {
      if (typeof result == 'object' && typeof result.sourceID == 'string' &&
        typeof result.data == 'object') {
        if (!Array.isArray(rv[result.sourceID]))
          rv[result.sourceID] = [];
        rv[result.sourceID].unshift(result.data);
      }
    });
    return rv;
  }
function _organizeDataBySource ( results ) { let rv = { } ; results . forEach ( result => { if ( typeof result == 'object' && typeof result . sourceID == 'string' && typeof result . data == 'object' ) { if ( ! Array . isArray ( rv [ result . sourceID ] ) ) rv [ result . sourceID ] = [ ] ; rv [ result . sourceID ] . unshift ( result . data ) ; } } ) ; return rv ; }
Put valid data from results array into an object with sourceID as
 the key and data as a reverse-order array.
Put valid data from results array into an object with sourceID as the key and data as a reverse - order array .
// Correctly formatted result object with all relevant information // Initialize array if needed // See above on why this array is in reverse order