import json


def format_charts(data):
    """Form chart POST data for JSON usage within db.

    Args:
        data (dict): The request.form data to format.

    Returns:
        modules (list): A list of json-decoded dictionaries.
    """
    modules = []
    for item in data:
        if item.startswith('module_'):
            val_json = json.loads(data[item])
            modules.append(val_json)
    return modules