title: what is `[[` looking for in this sapply example?
body: <p>A followup to this <a href="https://stackoverflow.com/questions/18762408/how-to-use-and-as-a-function">How to use `[[` and `$` as a function?</a> question:  I started playing a bit with the original setup (reduced the size from 10000 to 3 for simplicity)</p>
  
  <pre><code>JSON &lt;- rep(list(x,y),3)
  x &lt;- list(a=1, b=1)
  y &lt;- list(a=1)
  JSON &lt;- rep(list(x,y),3)
  sapply(JSON, "[[", "a")
  [1] 1 1 1 1 1 1
  sapply(JSON,"[[",'b')
  [[1]]
  [1] 1
  
  [[2]]
  NULL
  
  [[3]]
  [1] 1
  
  [[4]]
  NULL
  
  [[5]]
  [1] 1
  
  [[6]]
  NULL
  
  sapply(JSON,'[[',1)
  [1] 1 1 1 1 1 1
  sapply(JSON,'[[',2)
  Error in FUN(X[[2L]], ...) : subscript out of bounds
  </code></pre>
  
  <p>That I think  I understand -- searching for "b" is different from demanding the existence of a second element.  But then, I created a deeper list:</p>
  
  <pre><code>NOSJ&lt;-rep(list(JSON),3)
  
  sapply(NOSJ,'[[',1)
    [,1] [,2] [,3]
  a 1    1    1   
  b 1    1    1   
  sapply(NOSJ,'[[',2)
  $a
  [1] 1
  
  $a
  [1] 1
  
  $a
  [1] 1
  </code></pre>
  
  <p>And now my head's hurting.  Can someone expand on what <code>[[</code> (or its <code>sapply</code> method) is doing here?</p>