'Render the defaults for this inline-component as a dict
for the real-input JSON'

def _filterby_defaults(self):

    if ('filterby' in self.options):
        filterby = self.options['filterby']
    else:
        return None
    if (not isinstance(filterby, (list, tuple))):
        filterby = [filterby]
    component = self.resource.components[self.selector]
    table = component.table
    defaults = dict()
    for f in filterby:
        fieldname = f['field']
        if (fieldname not in table.fields):
            continue
        if ('default' in f):
            default = f['default']
        elif ('options' in f):
            options = f['options']
            if (('invert' in f) and f['invert']):
                continue
            if isinstance(options, (list, tuple)):
                if (len(options) != 1):
                    continue
                else:
                    default = options[0]
            else:
                default = options
        else:
            continue
        if (default is not None):
            defaults[fieldname] = {'value': default}
    return defaults
