I just ran this in my test environment with a Contacts list as the source, and it worked for me. You might want to check the returned data in Firebug or Fiddler to see what's happening.
Note that if the WorkCity column is empty, you'll get undefined in your code. Items are stored sparsely.