我在看anisbythonapi,它通过json返回值,然后可以将其存储为dict
{
"dark" : {
"web1.example.com" : "failure message"
},
"contacted" : {
"web2.example.com" : 1
}
}
我觉得这是一个挑战dict.获取web2的嵌套值。example.com网站,联系不足。在
提前谢谢。我会举我的例子,但是他们没有提供任何有用的东西。在
参考文献:
https://github.com/ansible/ansible/blob/12a2585e84be7fdf40e07ca1415f4938e95de1f3/docsite/rst/developing_api.rst
Tags:
假设你得到的字典如下:
然后可以按如下方式访问值:
^{pr2}$相关问题 更多 >
编程相关推荐