In the API version 2.3.X and lower there was a lovely WebMap object method called get_layer() that allowed you to retrieve the layer definition using a title parameter and supplying in the name of the layer as a string. See the docs here.
With 2.4.0 this neat functionality has been removed. We now access the layer via m.content.layers[index_position], which means I need to know the index of the layer in the first place. I now have to write a custom method to get the layer of interest based on the title!
Please reinstate this functionality and bring back a way for us to get the WebMap (Map) layer by the layer title!