Skip to content

Instantly share code, notes, and snippets.

@oguzcan-yavuz
Last active December 10, 2019 10:14
Show Gist options
  • Save oguzcan-yavuz/b6aa1b96d398cdf1bb4d417fe5fdc522 to your computer and use it in GitHub Desktop.
Save oguzcan-yavuz/b6aa1b96d398cdf1bb4d417fe5fdc522 to your computer and use it in GitHub Desktop.
mongo document to json
# You need to copy the document to the clipboard before running this. The result will be copied to the clipboard.
pbpaste | perl -ne "s/(.*)( \w+\()(.*)(\))(.*)/\1\3\5/g; print;" | pbcopy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment