accessing name of an index in a list : <p>With a list like below</p>

<pre><code>mapping &lt;- c( "All A"= list(c('a1', 'a2')), "All B" = list(c('b1', 'b2')))
</code></pre>

<p>I can access the vector in index 1 as below</p>

<pre><code>&gt; mapping[[1]]
[1] "a1" "a2"
</code></pre>

<p>How do I get the name of list at index 1 - i.e <code>All A</code> </p>
