Figured out how to do this.
It seems Magento treats the
custom_attributes collection properties (
attribute_codes) as field names directly, so you can search by them and limit their results in the 'fields
list by referring to theattribute_code` value directly.
Let's take a look at the following
To filter the products to include only those that have a
color = red, you can do this:
And further, to limit the collection of
custom_attributes to only return the
color custom attribute, include it in the list of
fields, like this (specifically the
custom_attributes[color] part, but showing it within the context of including some other fields as you normally would):
If you want more than one attribute, list them via a comma separated list, like so:
The only strange thing about this, is that it is wrapping the attribute_code within a higher level parent,
12 in this case...which I think is the Attribute Id.