我的JSON dict如下所示:
{
"end": 1,
"results": [
{
"expired": false,
"tag": "search"
},
{
"span": "text goes here"
}
],
"totalResults": 1
}
这条生产线的产品是:
^{pr2}$我的目标是让“span”键进入“results”列表。当totalResults>;1时,这是必需的。在
{
"end": 1,
"results": [
{
"expired": false,
"tag": "search",
"span": "text goes here"
},
],
"totalResults": 1
}
我试过几种方法,比如用'dictname.update,但这会覆盖“results”中的现有数据。在
这里还有一个解决方案,如果你想你可以使用下面的代码。在
或者,如果您真的想使用
^{pr2}$update
:但请注意,这是一个不必要的创造
相关问题 更多 >
编程相关推荐