Created
November 16, 2019 02:35
-
-
Save sajeetharan/ae7b9167691b16089138bc74cce62211 to your computer and use it in GitHub Desktop.
Remove meta props from cosmosdb query
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function stripMeta(doc) { | |
var metaProps = ["_rid", "_ts", "_self", "_etag", "_attachments"]; | |
var newDoc = {}; | |
for(var prop in doc) { | |
if (metaProps.indexOf(prop) == -1) { | |
newDoc[prop] = doc[prop]; | |
} | |
} | |
return newDoc; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment