5
Hello,
I have an array that is returned via an AJAX request and I intend to format the numbers of each of these keys as follows:
Example:
Standard values
-> 2569
-> 192544694
How I wish they were formatted
-> 2.569
-> 192.544.694
Of course, this formatting would be through a function because it is a variable value. I came to create a function but I did not have total flexibility in its effectiveness, besides trying some frameworks, as number.js
, for example.
Any solution? Be it a script or alternative framework?
Are these numbers, or money? (About formatting money: http://answall.com/q/11018/129)
– Sergio
@Sergio, are numbers!
– João Vitor
Okay, so my answer should do what you need. Take a look.
– Sergio