json_exporter
json_exporter copied to clipboard
JSON key with a dot ('.')
I think this issue is actually in the jsonpath library, so I opened an issue there, but I'm hoping someone here may know the answer. That issue is here: https://github.com/kubernetes/client-go/issues/1000
Imagine the following JSON: { 'one': 2, 'example.three': 'four', }
A query like ".one" or "$.one" works fine. However, I can't find a way to query for the second key. As I understand, "$.['example.three']" should do it, but this fails because it is interpreted as an array.
Is there any way I can escape the dot?
Faced same issue, just escape dot with '\':
values:
example: '{.example\.three}'
Since the above solution works, I will close this issue.