Created
November 10, 2021 01:36
-
-
Save nabsha/916712533edc35042d94fea653ef3bde to your computer and use it in GitHub Desktop.
Generate jsonpath out of yaml document
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## This script generates properties files to generate json | |
## depends on yq https://kislyuk.github.io/yq/ | |
## E.g input: | |
# ep1: | |
# connection: | |
# responseTimeout: "30" | |
## Output: | |
## "secure::ep1.connection.responseTimeout":"30", | |
cat <yamlfile>| yq -c 'paths(scalars) as $p | "secure::\($p|join(".")):\(getpath($p))",' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Make it public