Skip to content

Instantly share code, notes, and snippets.

@linus-amg
Created March 19, 2015 23:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save linus-amg/1d3c1d86c334e3778d91 to your computer and use it in GitHub Desktop.
Save linus-amg/1d3c1d86c334e3778d91 to your computer and use it in GitHub Desktop.
query.coffee
myArray = []
_id = 'e427a9b6-328c-4b95-a6e3-421ab74d5163'
key = "bpm.processes." + _id
obj = {}
obj[key] = 'b4503eb5-7e8b-44da-bca1-73735bd3a92a';
myArray[0] = {'root': true}
myArray.push(obj)
query = {};
query['$and'] = myArray
console.log JSON.stringify(query)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment