Error: [] operator not supported for strings: [] operator not supported for strings