Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- I wrote this to standardize all the meta data that i wanted in my documents:
- function Shlock(kind, method, url, data) {
- this.kind = kind;
- this.method = method;
- this.url = url;
- this.data = data;
- this.time = new Date().toJSON();
- };
- Then I used it like this:
- vis.on("mousedown", function() {
- var self = this;
- var point = mousePoint(self);
- var pack = {};
- pack.point = point;
- pack.client = gClient;
- var ev = new Shlock('web','point','/force-hcp1.html',pack);
- socket.emit('point',{'shlock':ev});
- restart();
- });
- But, pack is an object that has elements which are objects themselves.
- And that makes filtering via Mongo's built in field filtering API not work.
Add Comment
Please, Sign In to add comment