Scripts: How to enumerate all options of a Single- or Multi-Select?

In a script, how can I enumerate the names and IDs of all the options (entities) in a Single- or Multi-Select field?

Assume that I have its fieldObjects entry.

I don’t know if you mean public id or fibery id, but would this work for you?

const fibery = context.getService('fibery');
const e = await fibery.executeSingleCommand({
    "command": "fibery.entity/query",
    "args": {
        "query": {
            "q/from": "AppName/SelectFieldName_AppName/ParentType",
            "q/select": [
                "fibery/id",
                "fibery/public-id",
                "enum/name",
            ],
            "q/limit": "q/no-limit"
        },
    }
}
);

console.log(e);