Created
June 5, 2017 20:23
-
-
Save prat0318/a476f0989f89f3175805df7ef570fc5c to your computer and use it in GitHub Desktop.
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
{{- range $_, $key := .Values | keys | sortAlpha -}} | |
{{- $value := index $.Values $key -}} | |
{{- if kindIs "map" $value -}} | |
{{- range $_, $nested_key := $value | keys | sortAlpha -}} | |
{{- $nested_value := index $value $nested_key -}} | |
{{- if kindIs "map" $nested_value -}} | |
{{- range $_, $nested_nested_key := $nested_value | keys | sortAlpha -}} | |
{{- $nested_nested_value := index $nested_value $nested_nested_key -}} | |
{{- if kindIs "map" $nested_nested_value -}} | |
{{- range $_, $nested_nested_nested_key := $nested_nested_value | keys | sortAlpha -}} | |
{{- $nested_nested_nested_value := index $nested_nested_value $nested_nested_nested_key -}} | |
{{ $nested_nested_nested_key }}: {{ $nested_nested_nested_value }} | |
{{- end -}} | |
{{- else -}} | |
{{ $nested_nested_key }}: {{ $nested_nested_value }} | |
{{- end -}} | |
{{- end -}} | |
{{- else -}} | |
{{ $nested_key }}: {{ $nested_value }} | |
{{- end -}} | |
{{- end -}} | |
{{- else -}} | |
{{ $key }}: {{ $value }} | |
{{- end -}} | |
{{- end }} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment