擅长:python、mysql、java
<p>这是你想要的吗?。
在python中,我们可以通过</strong>键得到值。在</p>
<p>从您的输出:</p>
<pre><code>output = {
"took": 0,
"timed_out": false,
"_shards": {
"total": 1,
"successful": 1,
"failed": 0
},
"hits": {
"total": 84678,
"max_score": 0,
"hits": []
},
"aggregations": {
"vocab": {
"value": 178050**
}
}
}
print (output["aggregations"]["vocab"]["value"]) # It will print the value or use output.get("aggregations").get("vocab").get("value")
178050
</code></pre>