Hi R helpers,

I have json inputs from an app which I want to convert to dataframes. Below
are the two inputs. Can someone help me in converting these to dataframes

*Input1*

{"booking":{"id":"54092","createdOn":"2016-10-06T06:29:00.0000000+0000","bookingDateTime":"2016-10-08T06:45:00.0000000+0000","checkInDateTime":null,"checkOutDateTime":null,"tableNumbers":null,"pax":3,"type":"calling","status":"booked","source":"concierge","specialInstruction":"test
hoppi","outlet":{"id":"46a97c2e-c921-4339-819c-50e17f25d09a","name":"Hoppipolla"},"customer":{"name":"Hoppi","email":"
ho...@xmail.com
","countryCallingCode":"91","phone":"8901234567"}},"eventType":"booked","serverDateTime":"2016-10-06T06:28:25.0000558+0000"}

{"booking":{"id":"54093","createdOn":"2016-10-06T06:30:00.0000000+0000","bookingDateTime":"2016-10-08T06:46:00.0000000+0000","checkInDateTime":null,"checkOutDateTime":null,"tableNumbers":null,"pax":3,"type":"calling","status":"booked","source":"concierge","specialInstruction":"test
hoppi","outlet":{"id":"46a97c2e-c922-4339-819c-50e17f25d09a","name":"Hoppipolla"},"customer":{"name":"Ravi","email":"
r...@xmail.com
","countryCallingCode":"91","phone":"8901234548"}},"eventType":"booked","serverDateTime":"2016-10-06T06:28:25.0000558+0000"}


*Input2*


{"feedback":{"dateTime":"2016-10-06T09:24:05.0000730+0000","customerName":"mytestdevcog","averageRating":4,"isNegativeByComments":false,"outlet":{"id":"f9e9c21f-2e52-462e-a1f2-012dab216d27","name":"cholan
's Darbar"},"customer":{"name":"mytestdevcog","email":"
mytestdevcog...@gmail.com","countryCallingCode":"91","phone":"7895478745"},"responses":[{"question":"Was
your waiting time too
long?","response":"No","questionType":"yes_no"},{"question":"Service","response":"3","questionType":"rating"},{"question":"desserts","response":"4","questionType":"rating"},{"question":"Comments","response":"good","questionType":"short_answer"},{"question":"How
likely is it that you would recommend us to a friend or
colleague?","response":"5","questionType":"nps"},{"question":"Portion
Size","response":"5","questionType":"rating"},{"question":"Indian
Food","response":"4","questionType":"rating"},{"question":"Desert
spread","response":"4","questionType":"rating"}]},"serverDateTime":"2016-10-06T09:24:27.0000644+0000"}

{"feedback":{"dateTime":"2016-10-06T09:24:05.0000730+0000","customerName":"mytestdevcog","averageRating":4,"isNegativeByComments":false,"outlet":{"id":"f9e9c21f-2e52-462e-a1f2-012dab216d27","name":"cholan
's Darbar"},"customer":{"name":"mytestdevcog","email":"
mytestdevcog...@gmail.com","countryCallingCode":"91","phone":"7895478745"},"responses":[{"question":"Was
your waiting time too
long?","response":"No","questionType":"yes_no"},{"question":"Service","response":"3","questionType":"rating"},{"question":"desserts","response":"4","questionType":"rating"},{"question":"Comments","response":"good","questionType":"short_answer"},{"question":"How
likely is it that you would recommend us to a friend or
colleague?","response":"5","questionType":"nps"},{"question":"Portion
Size","response":"5","questionType":"rating"},{"question":"Indian
Food","response":"4","questionType":"rating"},{"question":"Desert
spread","response":"4","questionType":"rating"}]},"serverDateTime":"2016-10-06T09:24:27.0000644+0000"}


Would require two seperate dataframes for two inputs. Help would be highly
appreciated


Regards,

Abhinaba

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to