1

I've posted a sample here - http://jsfiddle.net/bizl/tSVHu/

This simple array's long values get changed - particularly numbers ending 9 or 7 get chnaged to 8 (so its not quite rounding). I can't see why

 var a = [
          { "id": 13532811000001109, "name": "Dabigatran etexilate 110mg capsules",  "Group": "High Risk", "VPID": 13532811000001109   }, 
          { "id": 13532911000001104, "name": "Dabigatran etexilate 75mg capsules",  "Group": "High Risk", "VPID": 13532911000001104   },
          { "id": 13532811000001109, "name": "Pradaxa 110mg capsules (Boehringer Ingelheim Ltd)",  "Group": "High Risk", "VPID": 13532811000001109, "APID": 13505411000001109  },
          { "id": 13532911000001104, "name": "Pradaxa 75mg capsules (Boehringer Ingelheim Ltd)",  "Group": "High Risk", "VPID": 13532911000001104, "APID": 13504711000001102  }
          ];
bizl
  • 1,535
  • 2
  • 12
  • 21
  • Could the ID's be conflicting? And the fiddle works fine, you just need to enter text in the textbox then delete it. – Charlie Aug 31 '12 at 11:27
  • 1
    looks like the interger is to big for javascript, make your ints strings. se: http://stackoverflow.com/questions/307179/what-is-javascripts-max-int-whats-the-highest-integer-value-a-number-can-go-t – anderssonola Aug 31 '12 at 11:28

1 Answers1

2

Convert your integers to strings instead, see my comment above.

http://jsfiddle.net/tSVHu/2/

anderssonola
  • 2,195
  • 16
  • 29