This is how I did it in React. A slight change in the call structure, but easily altered to the ajax call.
I have a SharePoint Picture Library (but a normal list works the same way). One of the columns is a Choice list of locations, e.g. "Perth", "Melbourne", etc. By using the following query I get an object back of all fields in the Picture library. e.g.
let response: SPHttpClientResponse = await this.props.Context.spHttpClient
`')/fields?$filter=InternalName eq 'Location'`,
const Response = await response.json();
The key part of the query was:
this.props.Domain + this.props.Path + this.props.ParentSiteName +
/_api/web/lists/getbytitle(' + this.props.SPListNames.Floorplans +
')/fields?$filter=InternalName eq 'Location'
https://sharepointtenantname.sharepoint.com/sites/name/_api/web/lists/getbytitle('listname')/fields?$filter=InternalName eq 'Location'
Where InternalName is the attribute of the response object I get back from the SharePoint call that I want to filter on using my text 'Location'. If you are unsure of what to filter on, do a test call to this api to see the object that is returned and built the call based on your needs from that:
In the result, the object has a Choices attribute, which is an array of strings with all the choices I am interested in. I can use this to complete my task.