At the end maybe something like "Content in firstKeyWithIndexedArray: ‘blue’, ‘yellow’, ‘green’ | Content in secondKeyWithIndexedArray: ‘black’, ‘gray’, ‘white’"
(secondArray-Indexing is only a copy/paste-typo – in real there would be indexed in serial )
###In fusion-words something like:
Loop trough all secondLevelArray and use (in @process-manner) «${value + ", "}»
or in RawCollection/Collection «itemRenderer = ${item + ", "}».
AND While Looping trough firstLevelArray add «${value + “fncAsStrCmdBtwFirstLevelArrays(){},”}»
or in RawCollection/Collection «itemRenderer = ${item + “fncAsStrCmdBtwFirstLevelArrays(){},”}» …
###Asked in Slack
In the meantime I asked also in Slack, and @christianm asked there:
«Couldn’t you do that with with two Collections nested?»
###My experiments
This were also part of my first experiments, to solve the problem. But anytime I try with Neos.Fusion.RawCollection nested in Neos.Fusion.Collection and vice versa or Collection in Collection I ran in error «Array to string conversion», have problem with @context-stuff or some other walls before my head.
###PHP’s foreach in foreach
At the end I’m looking for fusion-solution for iterating through multi dimensional arrays and do level-depending stuff with like in php’s foreach()-IN-foreach()-Loop.
I guess one of my problem: RawCollection iterate trough all dimensions and return an array, but not only from the first level (green circled). I can’t find a solution to define RawCollection to not run trough all dimensions. iterator.cycle only get 1,2,3 from the first Dimension/Level back. So I can’t do code to stop on this level… (I guess)
The dump:
So, maybe you have an idea for christian’s «two Collections nested» or some other creative fusion-code. My Phantasie and Ability do not let me solve the problem.