How to get list of files in directory in git repo hosted on GitHub? [duplicate]

I have a repo jcubic/gaiman on GitHub. And I need to get a list of examples as a list (files in directory):

https://github.com/jcubic/gaiman/tree/master/examples

I’ve searched but was not able to find anything on how to get a list of files on GitHub. it should be a pretty common task to do.

I need this inside JavaScript hosted on GitHub pages at https://gaiman.js.org/ so I can list examples in a dropdown.