jQuery UI Autocomplete JSON example data returned

jQuery UI Autocomplete JSON example data returned

What does the data.geonames in  response( $.map( data.entities, function( item ) mean?

I am using a web method an an ASPX page to return the data (a List<object> collection) but don't know what I need to do to specify the 'geonames' part, or whatever would be relevant for my application.

My c# code is as follow:

  1.         [WebMethod]
  2.         [ScriptMethod(ResponseFormat = ResponseFormat.Json)]
  3.         public List<TheEntity> SearchEntitesJSON(string title)
  4.         {
  5.             Manager mng = new Manager();
  6.             List<TheEntity> entList = mng.SearchEntites(title);
  7.             return entList;
  8.         }

My jquery in the markup is virutally the same as in the autocomplete JSON datasource example except for I have replaced the url with my method above and changed dataType to JSON instead of JSONP. My script is as follows: 

  1. <script type="text/javascript">
  2.   $(function() {
  3.     function log( message ) {
  4.       $( "<div>" ).text( message ).prependTo( "#log" );
  5.       $( "#log" ).scrollTop( 0 );
  6.     }

  7.     $( "#city" ).autocomplete({
  8.       source: function( request, response ) {
  9.         $.ajax({
  10.           url: "Post.aspx/SearchEntitesJSON",
  11.           dataType: "json",
  12.           data: {
  13.             featureClass: "P",
  14.             style: "full",
  15.             maxRows: 12,
  16.             name_startsWith: request.term
  17.           },
  18.           success: function( data ) {
  19.             response( $.map( data.entities, function( item ) {
  20.               return {
  21.                 label: item.Title,
  22.                 value: item.Id
  23.               }
  24.             }));
  25.           }
  26.         });
  27.       },
  28.       minlength: 2,
  29.       select: function( event, ui ) {
  30.         log( ui.item ?
  31.           "Selected: " + ui.item.label :
  32.           "Nothing selected, input was " + this.value);
  33.       },
  34.       open: function() {
  35.         $( this ).removeClass( "ui-corner-all" ).addClass( "ui-corner-top" );
  36.       },
  37.       close: function() {
  38.         $( this ).removeClass( "ui-corner-top" ).addClass( "ui-corner-all" );
  39.       }
  40.     });
  41.   });
  42.     </script>