If you add &resultformat=json to your rest service call, the result will come in a perfect format for you javascript/AJAX application.
Many demos on this site uses this feature - have a look.
Regards
Martin