Is there a way to convert a Binary field of type 4 to type 0 using a Shell script?
I considered executing a simple script such as the one below:
db.places.find({}).forEach(function(data) {
// How can I access the data?
print(data.id);
// db.places.update(....)
});
However, I encountered difficulties in obtaining the binary data required to create a new Binary. Using Object.keys()
, I observed that only two fields were present: type
and len