skip to Main Content

Is there a tidy way to read a JSON string and translate into new variables?

I have a JSON string that I would like to spearate into new variables. I feel there must be a clever way but I cannot find the solution. df <- structure(list(subject = c("dtv85251vucquc45", "mcj8vdqz7sxmjcr0" ), response = c("{"P0_Q0":{"aktiv":2,"bekümmert":3,"interessiert":4,"freudig erregt":2,"verärgert":2,"stark":0,"schuldig":1,"erschrocken":1,"feindselig":1,"angeregt":2},"P1_Q0":{"stolz":1,"gereizt":1,"begeistert":2,"beschämt":2,"wach":1,"nervös":1,"entschlossen":1,"ängstlich":1,"aufmerksam":2,"durcheinander":2}}", "{"P0_Q0":{"aktiv":1,"bekümmert":3,"interessiert":1,"freudig…

VIEW QUESTION
Back To Top
Search