{"action":"created","issue":{"url":"https://api.github.com/repos/running-coder/jquery-typeahead/issues/133","labels_url":"https://api.github.com/repos/running-coder/jquery-typeahead/issues/133/labels{/name}","comments_url":"https://api.github.com/repos/running-coder/jquery-typeahead/issues/133/comments","events_url":"https://api.github.com/repos/running-coder/jquery-typeahead/issues/133/events","html_url":"https://github.com/running-coder/jquery-typeahead/issues/133","id":123797114,"number":133,"title":"Not really an issue but I need help in implementing a simple requirement.","user":{"login":"Bharat1103","id":10626464,"avatar_url":"https://avatars.githubusercontent.com/u/10626464?v=3","gravatar_id":"","url":"https://api.github.com/users/Bharat1103","html_url":"https://github.com/Bharat1103","followers_url":"https://api.github.com/users/Bharat1103/followers","following_url":"https://api.github.com/users/Bharat1103/following{/other_user}","gists_url":"https://api.github.com/users/Bharat1103/gists{/gist_id}","starred_url":"https://api.github.com/users/Bharat1103/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Bharat1103/subscriptions","organizations_url":"https://api.github.com/users/Bharat1103/orgs","repos_url":"https://api.github.com/users/Bharat1103/repos","events_url":"https://api.github.com/users/Bharat1103/events{/privacy}","received_events_url":"https://api.github.com/users/Bharat1103/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/running-coder/jquery-typeahead/labels/Support","name":"Support","color":"fef2c0"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-12-24T12:09:44Z","updated_at":"2015-12-26T14:26:47Z","closed_at":null,"body":"hi,\r\n\r\nI need help in implementing a simple feature can anyone please guide me on how I can get the required solution.\r\n\r\nProblem: I need to get the search results even if the query entered in the input field is in double quotes.\r\n"},"comment":{"url":"https://api.github.com/repos/running-coder/jquery-typeahead/issues/comments/167327640","html_url":"https://github.com/running-coder/jquery-typeahead/issues/133#issuecomment-167327640","issue_url":"https://api.github.com/repos/running-coder/jquery-typeahead/issues/133","id":167327640,"user":{"login":"Bharat1103","id":10626464,"avatar_url":"https://avatars.githubusercontent.com/u/10626464?v=3","gravatar_id":"","url":"https://api.github.com/users/Bharat1103","html_url":"https://github.com/Bharat1103","followers_url":"https://api.github.com/users/Bharat1103/followers","following_url":"https://api.github.com/users/Bharat1103/following{/other_user}","gists_url":"https://api.github.com/users/Bharat1103/gists{/gist_id}","starred_url":"https://api.github.com/users/Bharat1103/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Bharat1103/subscriptions","organizations_url":"https://api.github.com/users/Bharat1103/orgs","repos_url":"https://api.github.com/users/Bharat1103/repos","events_url":"https://api.github.com/users/Bharat1103/events{/privacy}","received_events_url":"https://api.github.com/users/Bharat1103/received_events","type":"User","site_admin":false},"created_at":"2015-12-26T14:26:47Z","updated_at":"2015-12-26T14:26:47Z","body":"Thanks, I guess I will have to use filter for each group separately then. I have also made some changes in the suggested answer so that it would not break the app even if the query string is only `\" \"` i.e. only double quotes.\r\n\r\nAlso made changes in regex so that It would remove single quotes as well as double quotes from the query.\r\n\r\n```javascript\r\nurl: [function (query) {\r\n                query = query.replace(/[\"']/g, \"\").trim()\r\n                if(query.length != 0){\r\n                    return {\r\n                        url: \"/searchAll\",\r\n                        data:{\r\n                            key: query\r\n                        }\r\n                    }\r\n                }else{\r\n                    return {\r\n                        url: \"/searchAll\",\r\n                        data:{\r\n                            key: '\" \"'\r\n                        }\r\n                    }\r\n                }\r\n            }, \"people\"]\r\n```\r\n\r\n```javascript\r\ncallback: {\r\n          onSearch: function (node, query) {\r\n              query = query.replace(/[\"']/g, \"\").trim()\r\n              if(query.length != 0){\r\n                  this.query = query\r\n              }else{\r\n                  this.query = '\" \"'\r\n              }\r\n        },\r\n```\r\n\r\nIs there any better way to do this, I mean cleaner way without the if-else construct."}}