我有一个JSON具有以下结构的文件:
{
"name":[
{
"someKey": "\n\n some Value "
},
{
"someKey": "another value "
}
],
"anotherName":[
{
"anArray": [
{
"key": " value\n\n",
"anotherKey": " value"
},
{
"key": " value\n",
"anotherKey": "value"
}
]
}
]
}
Run Code Online (Sandbox Code Playgroud)
现在我想要strip删除JSON文件中每个值的所有空格和换行符.有没有办法迭代字典的每个元素和嵌套的字典和列表?