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
.get(
this.props.Domain +
this.props.Path +
this.props.ParentSiteName +
`/_api/web/lists/getbytitle('` +
this.props.SPListNames.Floorplans +
`')/fields?$filter=InternalName eq 'Location'`,
SPHttpClient.configurations.v1
);
const Response = await response.json();
console.log('Response');
console.log(Response);
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'
Which is:
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:
https://sharepointtenantname.sharepoint.com/sites/name/_api/web/lists/getbytitle('listname')/fields
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.