title: Import nested Json into R
body: <p>I'm trying to import a json file into R and make it into a regular dataframe. I've been trying for hours and haven't managed (I'm a beginner).</p>
  
  <p>That's what the json looks like (it's much longer):</p>
  
  <pre><code> {"000D04":{"r":"FA1282","t":"C295","f":"00","d":"CASA C-295 M"},"000005":{"r":"N-BXF","t":"E145","f":"00","d":"Embraer ERJ-145-LR"}}
  </code></pre>
  
  <p>First I import the json:</p>
  
  <pre><code>raw_json &lt;- fromJSON(txt="json_file.json")
  </code></pre>
  
  <p>That gives me a nested list:</p>
  
  <pre><code>$ 000D04:List of 4
    ..$ r: chr "FA1282"
    ..$ t: chr "C295"
    ..$ f: chr "00"
    ..$ d: chr "CASA C-295 M"
   $ 000005:List of 4
    ..$ r: chr "N-BXF"
    ..$ t: chr "E145"
    ..$ f: chr "00"
    ..$ d: chr "Embraer ERJ-145-LR"
  </code></pre>
  
  <p>I tried to do as_tibble() and looked up lots of other options. The closer I got was with the following, but it's still not there.</p>
  
  <pre><code>asTibble &lt;- as.data.frame(t(as_tibble(aircrafts)))
  </code></pre>
  
  <p>I can't seem to manage. Any ideas?</p>
  
  <p>Thanks in advance!!</p>