Please help - I have the following code which returns the variable 'results' in an alert. I want to use this variable outside of the function, and cannot get a callback, or outside declaration to work successfully. I'm sure I'm being a muppet, so I apologise for this basic question.....
<script src='http://code.jquery.com/jquery-1.9.1.js'></script>
<script>
$(function () {
$.ajax({
type: 'POST',
dataType: 'jsonp',
url: 'https://creator.zoho.com/api/json/my-company-culture/view/PageFeed_Report?scope=creatorapi&authtoken=d670dc68ac0f6d7ca389e7b206a25045',
success: function (results) {
var raw_result=JSON.stringify(results);
alert(results);
}
});
});
</script>