1

I have this json string:

> {"typeA":{"alerted":false,"value":""},"typeB":{"limit":0,"amount":1,"alerted":true,"disabled":true},"typeC":{"abc":"414720","alerted":false}}

And I want to parse it into this dataframe template in R:

template

Any suggestion is very appreciated.

alistaire
  • 42,459
  • 4
  • 77
  • 117
  • Welcome to StackOverflow! Please do not post data as an image: I have no interest in transcribing data, especially when it is trivial for the OP to submit something I can copy/paste. Please read about [minimal examples](http://stackoverflow.com/help/mcve) and [reproducible question](http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example), both provide great advice on how to make it easier for us to answer your question. (And always include code you've tried ... show us some effort, we're more likely to help you.) – r2evans May 08 '17 at 05:30
  • `as.data.frame(do.call(c, jsonlite::fromJSON('{"typeA":{"alerted":false,"value":""},"typeB":{"limit":0,"amount":1,"alerted":true,"disabled":true},"typeC":{"abc":"414720","alerted":false}}')))` – alistaire May 08 '17 at 05:35
  • Thanks @alistaire, I found the solution. – Tan Trinh Cong May 09 '17 at 04:50

0 Answers0