I have JSON file with events and logs inside those events, the example looks like this:
{
"sessionEvents": [
{
"u": "BC0F6A3A2840B6F48386BABC5F34B480BA4F9929",
"v": "0.1.0",
"dv": "Unidentified",
"t": 1462924115818,
"uid": "",
"len": 148012,
"by": 0,
"g": "U",
"cy": "PH",
"cr": "Unknown",
"dm": "O+ Xfinit",
"lat": 0.0,
"lon": 0.0,
"l": [
{
"e": "100_SESSION_START",
"o": 24,
"d": 147988,
"p": {
"User_Timezone": "-08:00",
"Session_nb": "0",
"Energy_Balance": "89",
"Global_Playtime": "0",
"Device_id": "75e64b654c01949",
"Game_Language": "en",
"Connection_Type": "WIFI",
"User_Country": "US",
"Push_Impact": "None"
}
},
{
"e": "008_TUTORIAL_STEP_OTHER",
"o": 7561,
"d": 0,
"p": {
"Screen_id": "scene_screen",
"Misclicks": "0",
"Tutorial_Step": "19",
"Average_Time_Per_Frame": "0",
"Total_Time": "0"
}
}
]
},
{
"u": "C950FC733D883E11E36E15A705E05A3CC7748C3A",
"v": "0.1.0",
"dv": "OPPO Mirror 5",
"t": 1462908916463,
"uid": "",
"len": 5368,
"by": 0,
"g": "U",
"cy": "PH",
"cr": "Unknown",
"dm": "A51w",
"lat": 0.0,
"lon": 0.0,
"l": [
{
"e": "100_SESSION_START",
"o": 169,
"d": 5199,
"p": {
"User_Timezone": "-08:00",
"Session_nb": "0",
"Energy_Balance": "0",
"Global_Playtime": "0",
"Device_id": "d0de71513e48fba",
"Game_Language": "en",
"Connection_Type": "WIFI",
"User_Country": "US",
"Push_Impact": "None"
}
}
]
}
]
}
As you can see, there is a second level object "l" with logs of the event and third level "p" with parameters and it gives me a pain. I'm trying to convert it to data frame, but I only need "100_SESSION_START" logs' values in table (all parameter names of "l" and "p" names are the same for it), plus, I need to add all the parameters from higher level object - event ('u','v','dv','t'...). Does anyone have any idea how to do it user R?
upd: in a result it would e nice to have table like this click