擅长:python、mysql、java
<p>尝试循环json并将对象属性提取到新数组中。
例如:</p>
<pre><code>results= [
{
"title": "subject1",
"ja_pub_yyyy": 1395,
"uuid": "86ae6",
"external_link": None,
"fulltext_status": 1,
},
{
"title": "subject1",
"ja_pub_yyyy": 1395,
"uuid": "86ae6",
"external_link": None,
"fulltext_status": 1,
}
]
res = []
for data in results:
res.append({'name': data['title'], 'id': data['uuid']})
print(res)
</code></pre>