how to assign ajax response to variable in javascript