def flatten_charts(opts):
    """Given an options object, return a list of JSON-serialized chart objects.

    Arguments:
        opts: a Resource chart object

    Returns:
        A list of charts serialized as JSON objects.
    """
    return list(map(lambda c: c.to_dict(), opts.get('charts', [])))