Anyone got a more elegant way to do the following code? In this case there are 3 levels of nested groups to iterate through - in the future there could be more levels. This also goes for searching through keys and values for tables within tables…
local blur = function (child) -- Code to apply a fill.blur effect on child end local i,j,k for i=1,menuGroup.numChildren do local child = menuGroup[i] if child.numChildren == nil then blur(child) else for j=1,child.numChildren do local child2 = child[j] if child2.numChildren == nil then blur(child2) else for k=1,child2.numChildren do local child3 = child2[k] if child3.numChildren == nil then blur(child3) end end end end end end