I have an array with elements. These elements are object paths. Some are just one level deep : ui.main and some are multiple levels deep : ui.main.tab. Now my intention is to perform an action whenever the path is just one level deep.
so for example ui.main => perform action. ui.tab.main => do nothing etc.
I know i have to use some sort of loop and a regular expression, but i am having trouble combining the two as i am not comfortable working with those.
['foo.bar', 'foo.bar.baz']?