def find_budget_friendly_option(selected_product_details): """ Finds the most budget-friendly option for each category of products. Parameters: selected_product_details (dict): A dictionary where the keys are product categories and the values are lists of product details. Each product detail is expected to be a dictionary containing a 'price' key. Returns: dict: A dictionary where the keys are product categories and the values are the most budget-friendly product details for each category. """ budget_friendly_options = {} for category, items in selected_product_details.items(): if isinstance(items, list): lowest_price_item = min(items, key=lambda x: x['price']) else: lowest_price_item = items budget_friendly_options[category] = lowest_price_item return budget_friendly_options