adding an int element into an associative array #4614
Unanswered
EmmanuelTuloup
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
hello,
i would like to create an associative array, to count how many nb of commande of the same number appears:
FOR
{% set cle = '' ~ commande %}
{% set dossiers = dossiers | merge({ (cle): (dossiers[cle] | default(0)) + 1 }) %}
ENDFOR
but the key is 0,1,2 instead of 353,832,156
how to resolve this problem ?
thanks
Beta Was this translation helpful? Give feedback.
All reactions