Notifications
Clear all

[Closed] How can I do that?

I need to pass through an array of array and merge group
like:
the original array would be something like:

#(#(#("info2"),#("group1")),#(#("info1"),#("group1")),#(#("info1"),#("group3")))

I need to get

 #(#(#("info2","info1"),#("group1")),#(#("info1"),#("group3")))

so “aaa” and “bbb” gets grouped and associated with group “group1” while group3 it still alone.

the format of the array will always be the same, it might get longer tho but “group” will always be behind the info data

3 Replies

nvm I found another solution to my initial problem that doesnt involve stacking arrays another array and then looking for match.

I wasnt happy at all about this type of solution.

honestly… for me it looks like you are cooking something using your own ingredients and following your own recipe.
i really don’t see a question.

IMHO, you should reconsider the way your store the informations.

I can see no obvious relationship between what you have and what you try to get (or maybe it’s friday, my brain is already off).

Consider using a struct maybe, as there’s no dict objects in mxs.