The issue arises because json.decode generates new objects each time it's called, and indexOf in Dart compares objects by reference for complex types like lists, maps, or other objects