Is there an aggregation operator that can convert a string type hex to a decimal? We are working with blockchain data and have run into cases like this quite often.
Hi @Kuan_Huang,
Welcome to MongoDB community!
Have you tried to use a $convert or $toDouble operator in a project or addFields stage?
Best
Pavel
That works. Thank you!
Hi @Kuan_Huang ,
As you can see the projection stage preview results in no value for “b” therefore its null later.
I would use $addFields and have represantation of a binary string via the extended json represtation :
Thanks
Pavel
Thank you. I will find sometime to explore it and get back to you.
This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.