title: Getting the LayerGroup a layer belongs to with OpenLayers
body: <p>I have quite a few Tile Layers in my map, and they are all organized into different groups (sometimes they are even nested).</p>
  <p>I see in API there's a <a href="https://openlayers.org/en/latest/apidoc/module-ol_interaction_Select-Select.html#getLayer" rel="nofollow noreferrer"><code>getLayer()</code></a> method to retrieve the layer a Vector feature belongs to, and a <a href="https://openlayers.org/en/latest/apidoc/module-ol_PluggableMap-PluggableMap.html#getLayerGroup" rel="nofollow noreferrer"><code>getLayerGroup()</code></a> to retrieve all groups associated with a Map.</p>
  <p>However, I could not find anything on getting the layerGroup a layer is associated with.</p>
  <p>Lets'say I have this situation:</p>
  <pre><code>var myGroup = new LayerGroup();
  var myLayer = new TileLayer();
  myGroup.getLayers().insertAt(0, myLayer);
  </code></pre>
  <p>Is there a way to get <code>myGroup</code> from <code>myLayer</code>?</p>