def get_monthly_budget(data, category):
    """
    Find the amount allocated to a category for a month.
    """
    for subcategory in data:
        if subcategory["categoryId"] == category:
            return subcategory["budgeted"]
    return 0