Hey,
We’ve got a REST call that returns two id’s.
“id”: {
“id1”: 8682604121359729092,
“id2”: -4624766493329595303
},
These are quite big and so when my tests were failing I noticed that the last three digits were being changed to zeros (Example: 8682604121359729000 instead of 8682604121359729092).
After some searching and saw that the value needed to be converted to a BigInt so, at first I used console.log(BigInt(8682604121359729092)) but that returned 8682604121359728640. In this case, the last 4 digits have been changed again but it still isn’t correct. Another suggestion was to use BigInt.asIntN(64, 8682604121359729092) but postman throws the error…
TypeError: Cannot convert 8682604121359729000 to a BigInt. As you can see, the value in the error also has the replaced zeros.
Although the values look right in the Response Body, if I send the response to the console, those values also show zeros on the end.
Any help would be appreciated since I need these id’s to run other tests.