title: How to read nested JSON structure?
body: <p>I have some JSON that looks like this:</p>
  
  <pre><code>"total_rows":141,"offset":0,"rows":[
  {"id":"1","key":"a","value":{"SP$Sale_Price":"240000","CONTRACTDATE$Contract_Date":"2006-10-26T05:00:00"}},
  {"id":"2","key":"b","value":{"SP$Sale_Price":"2000000","CONTRACTDATE$Contract_Date":"2006-08-22T05:00:00"}},
  {"id":"3","key":"c","value":{"SP$Sale_Price":"780000","CONTRACTDATE$Contract_Date":"2007-01-18T06:00:00"}},
  ...
  </code></pre>
  
  <p>In R, what would be the easiest way to produce a scatter-plot of <code>SP$Sale_Price</code> versus <code>CONTRACTDATE$Contract_Date</code>?</p>
  
  <p>I got this far:</p>
  
  <pre><code>install.packages("rjson")
  library("rjson")
  json_file &lt;- "http://localhost:5984/testdb/_design/sold/_view/sold?limit=100"
  json_data &lt;- fromJSON(file=json_file)
  install.packages("plyr")
  library(plyr)
  asFrame &lt;- do.call("rbind.fill", lapply(json_data, as.data.frame))
  </code></pre>
  
  <p>but now I'm stuck...</p>
  
  <pre><code>&gt; plot(CONTRACTDATE$Contract_Date, SP$Sale_Price)
  Error in plot(CONTRACTDATE$Contract_Date, SP$Sale_Price) : 
    object 'CONTRACTDATE' not found
  </code></pre>
  
  <p>How to make this work?</p>