Untitled
import json # Assuming 'data' is the JSON data provided above data = [ # Insert your JSON data here ] # Create a new dictionary with 'first_name_last_name' as key (using underscore) and 'email' as value new_dict = {f"{user['first_name']}_{user['last_name']}": user['email'] for user in data} print(new_dict)
Leave a Comment