I need to fetch data from url returned data was JSON.but while trying to fetch i am getting
Uncaught SyntaxError: Unexpected token :
here is the code please check it.
can you please tell me why i am getting this error and how to solve it.
$(document).ready(function () {
var Url = "https://www.nseindia.com/live_market/dynaContent/live_watch/get_quote/ajaxGetQuoteJSON.jsp?symbol=LIBERTSHOE";
$.ajax({
contentType: 'application/json',
dataType: 'json',
url: Url + '&callback=?',
success: function (data) {
alert(data);
},
error: function (jqXHR, text, errorThrown) { }
});});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
find fiddle link https://jsfiddle.net/vbpradeep/kf9ad1t3/