I have a byte array field in mongodb. while reading i have to show the binary data as hex string.
I am using express js, mongoose , node js to read data from mongodb.
In java to convert hex string to byte array we have:
byte[] bytes = DatatypeConverter.parseHexBinary(s);
And byte array to hex string we have
DatatypeConverter.printHexBinary(bytes);
I want to similar function which does the same job in node js.
also please guide me how to define schema to achieve in mongoose.