Skip to content

Commit 7c44daf

Browse files
authored
Merge pull request #711 from andreaTP/improve-set-array-values
Improve set array values section
2 parents c87f9f9 + f3650a3 commit 7c44daf

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

README.md

+11-5
Original file line numberDiff line numberDiff line change
@@ -684,20 +684,26 @@ With this option enabled only environment variables starting with
684684
i.e. The environment variable `CONFIG_FORCE_a_b__c___d` set the
685685
configuration key `a.b-c_d`
686686

687-
### Set array values from env variables
687+
### Set array values outside configuration files
688688

689-
Setting the value of array items from system properties requires
690-
specifing the index in the array for the value. So, while in HOCON
691-
you can set multiple values into an array or append to an array:
689+
Setting the value of array items from java properties or environment
690+
variables require specifying the index in the array for the value.
691+
So, while in HOCON you can set multiple values into an array or
692+
append to an array:
692693

693694
## HOCON
694695
items = ["a", "b"]
695696
items += "c"
696697

697-
Using java arguments you specify the exact position:
698+
Using java properties you specify the exact position:
698699

699700
-Ditems.0="a" -Ditems.1="b"
700701

702+
as well as with environment variables:
703+
704+
export CONFIG_FORCE_items_0=a
705+
export CONFIG_FORCE_items_1=b
706+
701707
### Concatenation
702708

703709
Values _on the same line_ are concatenated (for strings and

0 commit comments

Comments
 (0)