How to find a set of elements? XPath? iOS/JS/WD

In my app I have various containers/menus. In testing I want to check the elements contained, ensure that they are hat is expected.

So far I have come a long way using elementByAccessibilityId. I can get the container using that method. But I need to collect its children. How?

The elements I am looking for have Xpath like: //XCUIElementTypeScrollView[@name="SidePanelScrollView"]/XCUIElementTypeOther[1]/XCUIElementTypeOther/XCUIElementTypeButton[3]

So I tried:
let children = await driver.elementsByXPath(//XCUIElementTypeScrollView[@name=“SidePanelScrollView”]/XCUIElementTypeOther[1]/XCUIElementTypeOther/XCUIElementTypeButton);

This works. But to make this work I need to know the XPath. Is there a way I can do it by accessibility ID?

I put accessibility id’s on everything in our app. I use a dot notation that specifies <screen>.<element>, so I might say, login.button if there is only one button on the login screen, but that would differentiate it from dashboard.button. If I have nested elements I can easily extend this like: login.help.email_button. YMMV.

I want the elements in a container, no matter what the accessibility ID (I put them where I need them. Most places).