String Indices Must Be Integers in Python | Delft Stack
In that case, the j variable contains emp_name, which is a string, and when the control reads j['emp_name'], the interpreter control tries to recognize string indices, but it fails because Python accepts an integer, but we passed string. Most beginners make this type of mistake when accessing nested data.