Change Object ID display format from '{$oid: 'xxxx'}' to ObjectId('xxxxx')
It just uses only 1 line instead 3 lines. And we can copy it directly.
4
votes
xuesong
shared this idea
-
Yaniv Bahalker commented
Totally agree with you.
If you return a format of `{$oid: "..."}` I'm expecting it to work in the playground but it isn't.
When trying to use $oid in playground it show error "unknown operator: $oid".
So my workaround for now instead of manually change is to use regex (\{\s*\n*"\$oid":\s"(\w+)"\s*\n*\}) and replace with ObjectId("$1").Same thing for dates and ISODate...