1
如何獲取此函數以僅返回值「Accounting」?如何返回特定的json字段?
def getowner():
z = [{u'_ref': u'network/ZG5zLm5ldHdvcmskMTAuMTAwLjEwMC4wLz90jLzA:10.100.100.0/24/default', u'extattrs': {u'Owner': {u'value': u'Accounting'}}}]
return ((h['value']) for h in z['Owner'])
z = getowner()
print z
即時得到錯誤TypeError: list indices must be integers, not str