function findLayersInLayers(
  name,
  exactMatch,
  type,
  rootLayers,
  subLayersOnly,
  layersToExclude
) {
  let layers = []
  rootLayers.forEach(rootLayer => {
    let result = findLayersInLayer(
      name,
      exactMatch,
      type,
      rootLayer,
      subLayersOnly,
      layersToExclude
    )
    layers = layers.concat(result)
  })

  // return all found layers
  return layers
}
Finds a set of layer in a set of root layers.

@param {String} name
@param {Boolean} exactMatch
@param {String} type
@param {MSLayer} rootLayers
@param {Boolean} subLayersOnly
@param {Array} layersToExclude
@returns {array}