can jmespath support parse json-key with chinese like the next example
pandatools opened this issue · comments
import jmespath
data = {"姓名": "张三", "年龄": 18, "性别": "男"}
query = '姓名'
result = jmespath.search(query, data)
Yes, you'll need to surround the key name in double quotes (i.e a quoted identifier):
import jmespath
data = {"姓名": "张三", "年龄": 18, "性别": "男"}
query = '"姓名"'
result = jmespath.search(query, data)
print(result)
prints:
张三