Get YAML key which contains dot. #2692
-
Hi, How can I get value from the field which name contains a dot? to reproduce: # data.yaml
k1.k2: value
test: ❯ echo | benthos blobl --file test.blobl
{"keys":["k1.k2"],"v0":"value","v1":null,"v2":null} |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hey @artemklevtsov, you can try
Alternatively, this should also work: |
Beta Was this translation helpful? Give feedback.
Hey @artemklevtsov, you can try
root.src = file("./data.yaml").parse_yaml().get("k1~1k2")
. The syntax is documented here: https://docs.redpanda.com/redpanda-connect/configuration/field_paths/Alternatively, this should also work:
root.src = file("./data.yaml").parse_yaml()."k1.k2"