I am working on an API which allows searching with URLs like:
GET https://example.com/api/data?search[field1]=value1
GET https://example.com/api/data?search[field2]=value2
GET https://example.com/api/data?search[field1]=value1&search[field2]=value2
Basically, you can search for one or more field values by putting a field name in brackets. The problem is, the field names are defined by the user in their settings. The field name will be a string, but otherwise is not known ahead of time at a global level.
This answer is almost what I am looking to do, I just can't find a way to define the value inside the brackets to be "any string" rather than a list of known names.