{"action":"created","issue":{"url":"https://api.github.com/repos/strongloop/loopback-datasource-juggler/issues/410","labels_url":"https://api.github.com/repos/strongloop/loopback-datasource-juggler/issues/410/labels{/name}","comments_url":"https://api.github.com/repos/strongloop/loopback-datasource-juggler/issues/410/comments","events_url":"https://api.github.com/repos/strongloop/loopback-datasource-juggler/issues/410/events","html_url":"https://github.com/strongloop/loopback-datasource-juggler/issues/410","id":55621159,"number":410,"title":"How to use Custom Model.find method Synchronously?","user":{"login":"inawlaljar","id":1022222,"avatar_url":"https://avatars.githubusercontent.com/u/1022222?v=3","gravatar_id":"","url":"https://api.github.com/users/inawlaljar","html_url":"https://github.com/inawlaljar","followers_url":"https://api.github.com/users/inawlaljar/followers","following_url":"https://api.github.com/users/inawlaljar/following{/other_user}","gists_url":"https://api.github.com/users/inawlaljar/gists{/gist_id}","starred_url":"https://api.github.com/users/inawlaljar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/inawlaljar/subscriptions","organizations_url":"https://api.github.com/users/inawlaljar/orgs","repos_url":"https://api.github.com/users/inawlaljar/repos","events_url":"https://api.github.com/users/inawlaljar/events{/privacy}","received_events_url":"https://api.github.com/users/inawlaljar/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-01-27T14:03:30Z","updated_at":"2015-02-05T20:57:40Z","closed_at":"2015-02-05T20:57:40Z","body":"Hi, \r\n\r\nI am using a custom model and trying to filter it in a loop using find method. e.g. given below \r\n\r\nfor i = 0 to n\r\n{\r\n  var u = User.find( where { name: 'john'});\r\n}\r\n\r\nIt doesn't work. \r\n\r\n\r\nAlso, if I use the following\r\nfor i = 0 to n\r\n{\r\n  User.find( where { name: 'john'}, function(u) {... <callback?>} );\r\n\r\n  // How do I call the code for further processing? \r\n}\r\n\r\nIs there a way to call find method synchronously ? Please help. \r\n\r\nThanks,\r\nRaj"},"comment":{"url":"https://api.github.com/repos/strongloop/loopback-datasource-juggler/issues/comments/73126477","html_url":"https://github.com/strongloop/loopback-datasource-juggler/issues/410#issuecomment-73126477","issue_url":"https://api.github.com/repos/strongloop/loopback-datasource-juggler/issues/410","id":73126477,"user":{"login":"raymondfeng","id":540892,"avatar_url":"https://avatars.githubusercontent.com/u/540892?v=3","gravatar_id":"","url":"https://api.github.com/users/raymondfeng","html_url":"https://github.com/raymondfeng","followers_url":"https://api.github.com/users/raymondfeng/followers","following_url":"https://api.github.com/users/raymondfeng/following{/other_user}","gists_url":"https://api.github.com/users/raymondfeng/gists{/gist_id}","starred_url":"https://api.github.com/users/raymondfeng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raymondfeng/subscriptions","organizations_url":"https://api.github.com/users/raymondfeng/orgs","repos_url":"https://api.github.com/users/raymondfeng/repos","events_url":"https://api.github.com/users/raymondfeng/events{/privacy}","received_events_url":"https://api.github.com/users/raymondfeng/received_events","type":"User","site_admin":false},"created_at":"2015-02-05T20:57:40Z","updated_at":"2015-02-05T20:57:40Z","body":"Please post further questions to https://groups.google.com/forum/#!forum/loopbackjs"}}