我有当前的json格式:
data = [{'Content': 'This is the content', 'Title': 'Title1'},{'Content': 'I am content', 'Title': 'Title2'}, {'Content': 'This is more content', 'Title': 'Title3'}]
要将其转换为以下格式吗
data = {"Title":["Title1", "Title2", "Title3"], "Content":["This is the content","I am content","This is more content"]}
只需迭代列表并将每个键、值对附加到新字典:
相关问题 更多 >
编程相关推荐