Quantcast
Viewing all articles
Browse latest Browse all 21760

Re: Why is ColdFusion adding backslashes to my Concatenated string?

You're not performing a JSStringFormat() on that anywhere, are you?  (maybe in some code not posted).  JSStringFormat() assumes the text passed to it is a literal string, and then it will escape quoted values (like we're seeing here)

 

Also, on an aside, your JSON data is invalid, no?

 

Your loop updates the action list with an array, but it always assumes there is another index of values, so it prepends the comma.  You can even see in the final version your array of data ends with a '...},]}'  You may have to do a conditional test to see whether the loop is at it's max index, and if not, then prepend the comma.


Viewing all articles
Browse latest Browse all 21760

Trending Articles