New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(dig): accepts string with dot or arrays as "path" parameters #352
Comments
I do the following, not perfect, but works when you can control the context:
then in your template you can do:
for struct:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello 馃憢 ,
I would like to use the really useful
dig
function within a range, but because thedig
function only accepts "varargs" for path, I'm not able to use it.With
$someStruct
equals to:First,
The result of this one is
nil
becausedig
looks for{ "a.b.c": "value" }
馃檪. So the result is twice~
instead ofvalue
andvalue2
.Second, with array:
Here, it's a type cast problem because the first parameter is not a string like expected by the function. I have the following error:
It could be cool, especially in dynamic env like a
range
orwith
to have the ability to provide "path" coming from another variable dynamicallyThank you 馃槆
The text was updated successfully, but these errors were encountered: