In the JavaScript code you mustshould manage data from uint256 as BignumbersBigNumbers.
Elsewhere JavaScript cannot handle themyour data properly because there is not a native matching type in JavaScript.
Make just some research on the matter, you should be able to solve easily.
There are many examples here to, on this forum, just search for BigNumbers tag or search term.