House of Fusion
Search over 2,500 ColdFusion resources here
  
Home of the ColdFusion Community

Mailing Lists
Home /  Groups /  ColdFusion Talk (CF-Talk)

Leading zeros being removed

  << Previous Post |  RSS |  Sort Oldest First |  Sort Latest First |  Subscribe to this Group Next >> 
Top  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Chad Baloga
05/23/2010 03:11 PM

Has anyone figured out how not to have an array value with leading zeros not remove the zeros?  I have an array from a query which I am getting from a Jquery $.getJSON but it it removing some zeros from strings where I want the the leading zeros.  Thanks

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Cameron Childress
05/23/2010 03:31 PM

> Has anyone figured out how not to have an array value with leading zeros not > remove the zeros?  I have an array from a query which I am getting from a > Jquery $.getJSON but it it removing some zeros from strings where I want > the the leading zeros.  Thanks Post some code. -Cameron .

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Chad Baloga
05/23/2010 03:37 PM

I want to return the array like [{1:test},{2:00200}].  The actually array return is [{1:test},{2:200.0}].  I am just returning an array from a cfc.

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Andrew Scott
05/24/2010 05:24 AM

The Json needs to be wrapped in single or double quotes. So [{1:test},{2:200.0}] Should be [{1:'test'},{2:'00200.0'}] I want to return the array like [{1:test},{2:00200}].  The actually array return is [{1:test},{2:200.0}].  I am just returning an array from a cfc.


<< Previous Thread Today's Threads Next Thread >>

Search cf-talk

August 29, 2014

<<   <   Today   >   >>
Su Mo Tu We Th Fr Sa
           1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31             

Designer, Developer and mobile workflow conference