{"action":"created","issue":{"url":"https://api.github.com/repos/typicode/lowdb/issues/138","repository_url":"https://api.github.com/repos/typicode/lowdb","labels_url":"https://api.github.com/repos/typicode/lowdb/issues/138/labels{/name}","comments_url":"https://api.github.com/repos/typicode/lowdb/issues/138/comments","events_url":"https://api.github.com/repos/typicode/lowdb/issues/138/events","html_url":"https://github.com/typicode/lowdb/issues/138","id":190622584,"number":138,"title":"How to querry array of values between two number value?","user":{"login":"ngohuunam","id":3610240,"avatar_url":"https://avatars2.githubusercontent.com/u/3610240?v=3","gravatar_id":"","url":"https://api.github.com/users/ngohuunam","html_url":"https://github.com/ngohuunam","followers_url":"https://api.github.com/users/ngohuunam/followers","following_url":"https://api.github.com/users/ngohuunam/following{/other_user}","gists_url":"https://api.github.com/users/ngohuunam/gists{/gist_id}","starred_url":"https://api.github.com/users/ngohuunam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ngohuunam/subscriptions","organizations_url":"https://api.github.com/users/ngohuunam/orgs","repos_url":"https://api.github.com/users/ngohuunam/repos","events_url":"https://api.github.com/users/ngohuunam/events{/privacy}","received_events_url":"https://api.github.com/users/ngohuunam/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-11-21T05:28:08Z","updated_at":"2017-03-02T13:32:48Z","closed_at":null,"body":"Here my data:\r\n```\r\n[\r\n  {\r\n    \"idi\": 0,\r\n    \"ut\": 1479679625,\r\n    \"eid\": 0,\r\n    \"ide\": 0\r\n  },\r\n  {\r\n    \"idi\": 1,\r\n    \"ut\": 1479679630,\r\n    \"eid\": 1,\r\n    \"ide\": 0\r\n  },\r\n  {\r\n    \"idi\": 2,\r\n    \"ut\": 1479679650,\r\n    \"eid\": 0,\r\n    \"ide\": 1\r\n  },\r\n  {\r\n    \"idi\": 3,\r\n    \"ut\": 1479679655,\r\n    \"eid\": 1,\r\n    \"ide\": 1\r\n  }\r\n]\r\n```\r\n\r\nut is unix time, I need to get all objects between two ut values. like >= 1479679625 && <= 1479679655 (all objects between first & last object). I use lodash:\r\n\r\n```\r\nconst low = require('lowdb');\r\nvar _ = require('lodash');\r\n\r\nvar DB = low('pathDB');\r\nvar TIME_QUERRY_START_UNIX = 1479679625;\r\nvar TIME_QUERRY_STOP_UNIX = 1479679655;\r\nvar QUERRY = _.filter(DB, function(o) { return TIME_QUERRY_START_UNIX <= o.ut && o.ut <= TIME_QUERRY_STOP_UNIX; });\r\n```\r\nerror is: Cannot read property 'ut' of undefined\r\nhow I do a right command?\r\nthks"},"comment":{"url":"https://api.github.com/repos/typicode/lowdb/issues/comments/283654054","html_url":"https://github.com/typicode/lowdb/issues/138#issuecomment-283654054","issue_url":"https://api.github.com/repos/typicode/lowdb/issues/138","id":283654054,"user":{"login":"typicode","id":5502029,"avatar_url":"https://avatars1.githubusercontent.com/u/5502029?v=3","gravatar_id":"","url":"https://api.github.com/users/typicode","html_url":"https://github.com/typicode","followers_url":"https://api.github.com/users/typicode/followers","following_url":"https://api.github.com/users/typicode/following{/other_user}","gists_url":"https://api.github.com/users/typicode/gists{/gist_id}","starred_url":"https://api.github.com/users/typicode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/typicode/subscriptions","organizations_url":"https://api.github.com/users/typicode/orgs","repos_url":"https://api.github.com/users/typicode/repos","events_url":"https://api.github.com/users/typicode/events{/privacy}","received_events_url":"https://api.github.com/users/typicode/received_events","type":"User","site_admin":false},"created_at":"2017-03-02T13:32:48Z","updated_at":"2017-03-02T13:32:48Z","body":"Hi,\r\n\r\nThis should do the trick:\r\n\r\n```js\r\nconst db = low('db.json')\r\n\r\ndb.get('posts')\r\n  .filter(post => min < post.timestamp && post.timestamp < max)\r\n  .value()\r\n```\r\n"}}
{"actor":{"display_login":"typicode"}}