How can I convert a Json Number string to different format?
I get the Json numebr like that
Amount": 816673.5789
Here Amountis the column name.
I need to write a function using Javascript. This functing has two parameter one is this 'Amount', another is 'NumberFormate'. I need to convert this 'Amount' as given date 'NumberFormate' and function will return this number.
Here 'NumberFormate' indicate how many number we need to count after point.
Example:
If user given format is like that
##.##
the the function return number as 8,16,673.57
If user given format is like that
##.###
the the function return number as 8,16,673.578
Please remind that the number wil be comma separated when it return.