I have a JSON file of the following format:
/* 1 */
{
"input" : {
"text" : "car"
},
"output" : {
"text" : [
"Sorry! I didn't understand. Please rephrase."
],
},
"Auth" : "You are authenticated",
"Begin" : "Started",
"ID" : "ABC"
},
"timestamp" : ISODate("2017-02-20T12:36:40.226Z"),
}
/* 2 */
{
"input" : {
"text" : "bat"
},
"output" : {
"generic" : [
{
"response_type" : "text",
"text" : "I understood that!"
}
],
"text" : [
"I understood that!"
],
"log_messages" : []
},
"Auth" : "You are authenticated",
"Begin" : "Started",
"ID" : "CDE"
},
"timestamp" : ISODate("2016-02-20T12:36:40.226Z")
}
I would like to create a dataframe of the following format but I cannot figure out how to do it (I am not sure if you would have to clean the json file to not include comments):
ID Date Input["text"] Output["text"]
ABC 2017-02-20 car Sorry! I didn't understand. Please rephrase.
CDE 2016-02-20 bat I understood that!
Can anyone help?