标签: python json python-3.x
如何更改对象数组中的键名?
arrayObj = [{'key1':'value1', 'key2':'value2'},{'key1':'value1', 'key2':'value2'}]
如何将每个key1更改为stroke,以便获得:
key1
stroke
arrayObj = [{'stroke':'value1', 'key2':'value2'},{'stroke':'value1', 'key2':'value2'}]
在python3中