{"action":"opened","issue":{"url":"https://api.github.com/repos/algolia/autocomplete.js/issues/120","repository_url":"https://api.github.com/repos/algolia/autocomplete.js","labels_url":"https://api.github.com/repos/algolia/autocomplete.js/issues/120/labels{/name}","comments_url":"https://api.github.com/repos/algolia/autocomplete.js/issues/120/comments","events_url":"https://api.github.com/repos/algolia/autocomplete.js/issues/120/events","html_url":"https://github.com/algolia/autocomplete.js/issues/120","id":184786319,"number":120,"title":"[Doc] Add an exemple for displayKey as a function","user":{"login":"ElPicador","id":16667,"avatar_url":"https://avatars.githubusercontent.com/u/16667?v=3","gravatar_id":"","url":"https://api.github.com/users/ElPicador","html_url":"https://github.com/ElPicador","followers_url":"https://api.github.com/users/ElPicador/followers","following_url":"https://api.github.com/users/ElPicador/following{/other_user}","gists_url":"https://api.github.com/users/ElPicador/gists{/gist_id}","starred_url":"https://api.github.com/users/ElPicador/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ElPicador/subscriptions","organizations_url":"https://api.github.com/users/ElPicador/orgs","repos_url":"https://api.github.com/users/ElPicador/repos","events_url":"https://api.github.com/users/ElPicador/events{/privacy}","received_events_url":"https://api.github.com/users/ElPicador/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-10-24T09:07:38Z","updated_at":"2016-10-24T09:07:38Z","closed_at":null,"body":"Something like:\r\n\r\n```js\r\n{\r\n  source: autocomplete.sources.hits(teams, {hitsPerPage: 3}),\r\n  displayKey: function(sugg) { return sugg.firstname + \" \" sugg.lastname; },\r\n  templates: {\r\n    header: '<div class=\"category\">Teams</div>',\r\n    suggestion: function(hit) {\r\n      // render the hit using Hogan.js\r\n      return templateTeam.render(hit);\r\n    }\r\n  }\r\n},\r\n```"}}
{"actor":{"display_login":"ElPicador"}}