I believe you want to use JSON.decode(str);
See the docs here:
http://mootools.net/docs/Utilities/JSON

Jeremy Bueler
www.jbueler.com


On Mon, Feb 23, 2009 at 12:46 PM, Itay Moav <[email protected]>wrote:

> Hi,
>
> I have a form submitted:
> Form.set('send',{'onSuccess':function(responseText, responseXML){
>
>                 alert(responseText.data);
>
>             }
> });
> Form.send();
>
>
> The responseText is "{'data':10}"
> So, what should I do (beside using an eval) to make
> alert(responseText.data); echo 10?
> Right now, it is "undefined".
> The request returns with the correct data.
>

Reply via email to