I have a event that receives this transaction
{"transaction_hash":"0xb72ca08fecd5426e.....1a5a55",
"log_index":5,"recipient":"0x93da....63912",
"amount":"34615251479801996","address":"0x93071742......dc119496960e8",
"block_hash":"0x038a6.......f124d07f95a9bbf23faf",
"block_number":22774224,"transaction_index":1,"block_timestamp":"2021-12-17T11:27:20.000Z"}
I’m trying to store event.amount to db.
when I try to store it in the table I get the error
“amount should be a number string”
which makes sense, since amount is a string but the column is number.
My question is, what is the best way to convert this to a number?
I know I can convert this to number in mongodb when I do the query, but I would rather not do that as that is more expensive.