title: R mongolite: Arrays are loaded from mongo as columns with elements as data.frame
body: <p>I've been using <code>jsonlite</code> and I used to argument <code>simplifyDataFrame</code> in <code>fromJSON()</code> function. Is there something similar to this in <code>mongolite</code> package? For example using <code>handler</code> argument? I haven't find enough documentation for this method.</p>
  
  <p>I have records similar to</p>
  
  <pre><code>json &lt;- '{"list": [{"x": 1, "y": "a"},{"x": 2, "y": "b"}],"numeric": 1.2}'
  </code></pre>
  
  <p>When I load the records using <code>find()</code> function it creates data frame with two columns. The first column contains whole data frames as elements.</p>
  
  <pre><code>df &lt;- m$find()
  df$list[[1]]
  #   x y
  # 1 1 a
  # 2 2 b
  </code></pre>
  
  <p>What I want is something like</p>
  
  <pre><code>json %&gt;% fromJSON(simplifyDataFrame = F) %&gt;% as.data.frame.list
  #   list.x list.y list.x.1 list.y.1 numeric
  # 1      1      a        1        a     1.2
  </code></pre>
  
  <p>Is there a solution for that?</p>
  
  <hr>
  
  <p><strong>Edit:</strong></p>
  
  <p>I know that I can do it in a loop to convert the data frame into a list. Or convert the data into JSON format and then use the <code>fromJSON(simplifyDataFrame = F)</code>. Both methods are too slow for the size of data I use. See my <a href="https://stackoverflow.com/questions/39343993/r-vector-of-jsons-to-data-frame">previous question</a>.</p>