Godot: how to iterate through all scene nodes in c++ and check if node contain specific scene as child?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Robotex

I have scene. Scene contains some other scenes as scene objects. Some of this objects can have a scene of some type as child (just empty Node2D with script).

I need to iterate through all this objects in c++ and detect which of them contains that special scene as child.

How to do it?

How to iterate through all scene objects that belong to some group in c++?