promptdojo_

Nested dicts and lists — digging through the JSON AI just dumped — step 7 of 9

AI tried to read roles[\"admin\"] from a list and crashed with TypeError: list indices must be integers. The roles field is a list of strings, not a dict. Fix line 10 so the script prints admin (the first role).

The break is on line 9 — but read the whole snippet first.

full-screen editor opens — close anytime to keep reading.