I have managed to add config variables using this syntax
config :a_c, :custom,
c_p: 20
and for nested conf I have managed to add something like this:
config :a_c, :custom,
s: [
static: [
u: "http://localhost:90",
d: [
id: "006",
url: "som_url",
is_a: true,
c_p: 15
]
]
]
but what I really want is to use a number instead of static
like this:
config :a_c, :custom,
s: [
007: [
u: "http://localhost:90",
d: [
id: "006",
url: "som_url",
is_a: true,
c_p: 15
]
]
]
and I want to define more than one object inside d
like this:
config :a_c, :custom,
s: [
007: [
u: "http://localhost:90",
d: [
{
id: "006",
url: "som_url",
is_a: true,
c_p: 100
},
{
id: "009",
url: "som_url2",
is_a: true,
c_p: 155
},
]
]
]
and get it like this:
@s Application.get_env(:a_c,:custom)[:s]
c_p= @s[:007][:d][0][:c_p]
instead of
@s Application.get_env(:a_c,:custom)[:s]
c_p= @s[:static][:d][:c_p]