Get View component Object using view path

Hi all,

I'm trying to write a script which will allow me to inspect a views component object (root and children) indirectly.

The idea is I have an embedded view and a script which will return all the children found in the embedded view root given the embedded view's path.

I've looked in the sdk docs and saw this method which seems to use a referencePath but not quite sure if it's the right one.