Collection loop over to show only parent and not its children

I was just looking out a way to loop over collections but don't want to list any children, I need only entries which are at 1st level. I have tried a few things out of max_depth was one.

My collection structure looks something like this


And I want to print only Test 1 & Test 2

Answered by Rohan kamble!
>>>>>>> Answered <<<<<<<
2 Replies