Using the dictionary:
d = {'1': 'a'}
How can I extract the value ‘a’ using the jmespath
library in Python?
The following attempts do not work:
import jmespath
value = jmespath.search("1", d)
# throws jmespath.exceptions.ParseError: invalid token
value = jmespath.search("'1'", d)
# returns the key '1' instead of the value 'a'