{"action":"created","issue":{"url":"https://api.github.com/repos/devbridge/jQuery-Autocomplete/issues/563","repository_url":"https://api.github.com/repos/devbridge/jQuery-Autocomplete","labels_url":"https://api.github.com/repos/devbridge/jQuery-Autocomplete/issues/563/labels{/name}","comments_url":"https://api.github.com/repos/devbridge/jQuery-Autocomplete/issues/563/comments","events_url":"https://api.github.com/repos/devbridge/jQuery-Autocomplete/issues/563/events","html_url":"https://github.com/devbridge/jQuery-Autocomplete/issues/563","id":195053478,"number":563,"title":"How to display image with formatResult?","user":{"login":"sentiasa","id":9021386,"avatar_url":"https://avatars.githubusercontent.com/u/9021386?v=3","gravatar_id":"","url":"https://api.github.com/users/sentiasa","html_url":"https://github.com/sentiasa","followers_url":"https://api.github.com/users/sentiasa/followers","following_url":"https://api.github.com/users/sentiasa/following{/other_user}","gists_url":"https://api.github.com/users/sentiasa/gists{/gist_id}","starred_url":"https://api.github.com/users/sentiasa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sentiasa/subscriptions","organizations_url":"https://api.github.com/users/sentiasa/orgs","repos_url":"https://api.github.com/users/sentiasa/repos","events_url":"https://api.github.com/users/sentiasa/events{/privacy}","received_events_url":"https://api.github.com/users/sentiasa/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-12-12T18:48:02Z","updated_at":"2016-12-12T20:23:07Z","closed_at":null,"body":"Thanks for the great library!\r\n\r\nI am trying to put an image next to the text for each item in the dropdown. As far as I understand, it is possible by doing it in `formatResult`, however I couldn't understand how I will create my `formatResult` section.\r\n\r\n```\r\n$('#autocomplete').autocomplete({\r\n        lookup: function (query, done) {\r\n            // here I retrieved the results with ajax and by looping through my results, \r\n            // pushed inside suggestions. I also have an image for each item, however\r\n            // I couldn't figure out how I will pass the image and how to add it in formatResult\r\n\r\n            var object = { \"value\" : name, \"data\" : id }\r\n            result.suggestions.push(object);\r\n\r\n            done(result);\r\n       }\r\n```\r\n\r\nShould I pass the image inside object? I am very confused what I should do at this point."},"comment":{"url":"https://api.github.com/repos/devbridge/jQuery-Autocomplete/issues/comments/266541914","html_url":"https://github.com/devbridge/jQuery-Autocomplete/issues/563#issuecomment-266541914","issue_url":"https://api.github.com/repos/devbridge/jQuery-Autocomplete/issues/563","id":266541914,"user":{"login":"sentiasa","id":9021386,"avatar_url":"https://avatars.githubusercontent.com/u/9021386?v=3","gravatar_id":"","url":"https://api.github.com/users/sentiasa","html_url":"https://github.com/sentiasa","followers_url":"https://api.github.com/users/sentiasa/followers","following_url":"https://api.github.com/users/sentiasa/following{/other_user}","gists_url":"https://api.github.com/users/sentiasa/gists{/gist_id}","starred_url":"https://api.github.com/users/sentiasa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sentiasa/subscriptions","organizations_url":"https://api.github.com/users/sentiasa/orgs","repos_url":"https://api.github.com/users/sentiasa/repos","events_url":"https://api.github.com/users/sentiasa/events{/privacy}","received_events_url":"https://api.github.com/users/sentiasa/received_events","type":"User","site_admin":false},"created_at":"2016-12-12T20:23:07Z","updated_at":"2016-12-12T20:23:07Z","body":"Thanks a lot!"}}
{"actor":{"display_login":"sentiasa"}}