The table returned by an API query can be filtered using the filter query parameter. The value of the parameter is JSON. Examples are
filter=[{"field":"popid","value":"7","type":"string"}]
filter=[{"field":"popid","value":[7,8],"type":"list"}]
filter=[{"field":"esu_dps","value":"Salmon, Chinook (Snake River spring/summer-run ESU)","type":"string"}]
rcax_filter(x)
list of property (column) names, values in this format list(colname=value)
. If the property can take multiple values, this is passed in as list(colname=c(value1, value2))
The JSON for the filter query parameter
The property names in x
are the column names in a table being returned by rcax_table_query()
.
Note the values are not case sensitive. So a value of Spring
will return the data with Spring
and spring
.
crul properly formats the filter given the JSON. For reference, here is a url example. Note that in the filter double quotes are required. A single quote will not filter.