PS - if you're using double quotes in your JSON, you don't need to escape the single quotes.
[Note: Typo assistance courtesy of iPhone] > On Nov 19, 2013, at 1:02 AM, Jon Clausen <[email protected]> wrote: > > > Are you specifying the return type in your function call or are you pulling > it out of the default WDDX Packet? > > Your output looks like itâs being returned as javascript escaped JSON. For > example, the following using returntype=json, yields the correct raw JSON > array: > > URL: http://localhost/tests/jsonTest.cfc?method=giveMeJson&returnformat=json > > Component: > > component displayname="JSONTest" output="false"{ > > remote array function giveMeJson(){ > var a = arrayNew(1); > arrayAppend(a,"Miami Area Geriatric Education Center"); > arrayAppend(a,"Miami Children's Hospital"); > arrayAppend(a,"Miami Research Associates"); > arrayAppend(a,"Miami University (Oxford, Ohio)"); > arrayAppend(a,"Miami Valley Hospital"); > arrayAppend(a,"Miami, FL-546"); > arrayAppend(a,"University of MiamiJackson Health System"); > > return a; > > } > > } > > Result (which is exactly what should be returned by the request): > ["Miami Area Geriatric Education Center","Miami Children's Hospital","Miami > Research Associates","Miami University (Oxford, Ohio)","Miami Valley > Hospital","Miami, FL-546","University of MiamiJackson Health System"] > > Is the string your provided the response from Firebug, an echo of the var in > javascript or what you see as the browser source when you navigate directly > to it? If so, are you using JQueryâs native .getJSON() method? That should > give you an immediately workable JS array. > > HTH, > Jon > > >> On Nov 19, 2013, at 12:36 AM, Torrent Girl <[email protected]> wrote: >> >> >> This is what my response looks like: >> >> //"\/\/[\"Miami Area Geriatric Education Center\",\"Miami Children's >> Hospital\",\"Miami Research Associates\",\"Miami University (Oxford, >> Ohio)\",\"Miami Valley Hospital\",\"Miami, FL-546\",\"University of >> Miami\\\/Jackson Health System\"]" > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:357111 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

