我如何解析和处理已经存在于数据框中的 JSON?
样本数据:
df <- data.frame(
id = c("x1", "x2"),
y = c('[{"Property":"94","Value":"Error"},{"Property":"C1","Value":"Found Match"},{"Property":"C2","Value":"Address Mismatch"}]', '[{"Property":"81","Value":"XYZ"},{"Property":"D1","Value":"Blah Blah"},{"Property":"Z2","Value":"Email Mismatch"}]')
)
我想将列中的原始 JSON 提取、格式化和分离y
成有序的列,最好使用library(jsonlite)
.
提前致谢!