{"library":"glom","code":"from glom import glom, T\n\ndata = {\n    'user': {\n        'profile': {\n            'name': 'Alice',\n            'email': 'alice@example.com'\n        },\n        'preferences': {\n            'theme': 'dark'\n        }\n    },\n    'messages': [\n        {'id': 1, 'text': 'Hello'},\n        {'id': 2, 'text': 'World'}\n    ]\n}\n\n# Extract a deeply nested value\nuser_name = glom(data, 'user.profile.name')\nprint(f\"User Name: {user_name}\")\n\n# Transform data to a new structure\nuser_summary_spec = {\n    'name': 'user.profile.name',\n    'contact_email': 'user.profile.email',\n    'first_message': ('messages.0.text', str.upper)\n}\n\nuser_summary = glom(data, user_summary_spec)\nprint(f\"User Summary: {user_summary}\")\n\n# Using T for more complex access or method calls\nmessage_ids = glom(data, ('messages', [T['id']]))\nprint(f\"Message IDs: {message_ids}\")","lang":"python","description":"This quickstart demonstrates basic deep access to nested data, transformation into a new dictionary structure, and using the `T` specifier for iterating and extracting specific fields from a list of dictionaries.","tag":null,"tag_description":null,"last_tested":"2026-04-24","results":[{"runtime":"python:3.10-alpine","exit_code":0},{"runtime":"python:3.10-slim","exit_code":0},{"runtime":"python:3.11-alpine","exit_code":0},{"runtime":"python:3.11-slim","exit_code":0},{"runtime":"python:3.12-alpine","exit_code":0},{"runtime":"python:3.12-slim","exit_code":0},{"runtime":"python:3.13-alpine","exit_code":0},{"runtime":"python:3.13-slim","exit_code":0},{"runtime":"python:3.9-alpine","exit_code":0},{"runtime":"python:3.9-slim","exit_code":0}]}