{"action":"created","issue":{"url":"https://api.github.com/repos/techfort/LokiJS/issues/291","labels_url":"https://api.github.com/repos/techfort/LokiJS/issues/291/labels{/name}","comments_url":"https://api.github.com/repos/techfort/LokiJS/issues/291/comments","events_url":"https://api.github.com/repos/techfort/LokiJS/issues/291/events","html_url":"https://github.com/techfort/LokiJS/issues/291","id":119923480,"number":291,"title":"LokiJS not allowing Json data to insert.","user":{"login":"amitbrcmit","id":13832620,"avatar_url":"https://avatars.githubusercontent.com/u/13832620?v=3","gravatar_id":"","url":"https://api.github.com/users/amitbrcmit","html_url":"https://github.com/amitbrcmit","followers_url":"https://api.github.com/users/amitbrcmit/followers","following_url":"https://api.github.com/users/amitbrcmit/following{/other_user}","gists_url":"https://api.github.com/users/amitbrcmit/gists{/gist_id}","starred_url":"https://api.github.com/users/amitbrcmit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amitbrcmit/subscriptions","organizations_url":"https://api.github.com/users/amitbrcmit/orgs","repos_url":"https://api.github.com/users/amitbrcmit/repos","events_url":"https://api.github.com/users/amitbrcmit/events{/privacy}","received_events_url":"https://api.github.com/users/amitbrcmit/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-12-02T11:35:47Z","updated_at":"2015-12-04T00:27:06Z","closed_at":null,"body":"Hi i am using cordova/angularjs/lokijs while inserting records in db in json format it is showing typeerror(\"Document needs to be an object\") but in case of simple array its working fine.I need to store as JSON as requirement.\r\nAny help guys\r\nThanks"},"comment":{"url":"https://api.github.com/repos/techfort/LokiJS/issues/comments/161833495","html_url":"https://github.com/techfort/LokiJS/issues/291#issuecomment-161833495","issue_url":"https://api.github.com/repos/techfort/LokiJS/issues/291","id":161833495,"user":{"login":"roblav96","id":1457327,"avatar_url":"https://avatars.githubusercontent.com/u/1457327?v=3","gravatar_id":"","url":"https://api.github.com/users/roblav96","html_url":"https://github.com/roblav96","followers_url":"https://api.github.com/users/roblav96/followers","following_url":"https://api.github.com/users/roblav96/following{/other_user}","gists_url":"https://api.github.com/users/roblav96/gists{/gist_id}","starred_url":"https://api.github.com/users/roblav96/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/roblav96/subscriptions","organizations_url":"https://api.github.com/users/roblav96/orgs","repos_url":"https://api.github.com/users/roblav96/repos","events_url":"https://api.github.com/users/roblav96/events{/privacy}","received_events_url":"https://api.github.com/users/roblav96/received_events","type":"User","site_admin":false},"created_at":"2015-12-04T00:27:06Z","updated_at":"2015-12-04T00:27:06Z","body":"try this:\r\n```javascript\r\nconsole.log( typeof data )\r\ndb.insert(data)\r\n```"}}