I have a data frame where each row contains JSON formatted input. How can I parse these 3 rows into one table. I tired following commands, but it shows error.
a<-data.frame(v1=c('[{"ID":1,"Type":"Honda","Key":{"Service":"Destan","Name":"John"},"Fields":{"Price":23.005,"Cost":10,"DIFF":"13.005"}}]',
'[{"ID":2,"Type":"BMW","UpdateType":"Every hour","Key":{"Service":"Destan","Name":"Mark"},"Fields":{"Price":2.005,"Cost":1,"DIFF":"1.005"}}]',
'[{"ID":1,"Type":"Honda","Key":{"Service":"Destan","Name":"John"},"Fields":{"Price":13.005,"Cost":4,"DIFF":"9.005"}}]'))
a<-paste0(a$v1, collapse = ",")
l <- fromJSON(paste0(a$v1, collapse = ","))
Error is Error in a$v1 : $ operator is invalid for atomic vectors
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…