I'm new to coding...just wanted to know what am i doing wrong in this
<script type="text/javascript">
// This example loads the "Canadian Parliament 2012"
// dataset from a CSV instead of from JSON. // System.import('app').catch(function (err) { console.error(err); });
$(function() {
Dimensions = "sector_type";
Measures = "";
tblname = "sample";
$.ajax({
method: "GET",
url: "http://localhost:5000/api/values/5"
headers: {
'Content-Type': 'application/json'
},
traditional: true,
async: false,
}).success(function results(data) {
chartdata = data.data;
alert("SUCCESS");
});
});
</script>
This is giving me Uncaught Reference :$ is not defined.Also is this the right way of writing a small script for retrieving data from localhost:5000 and what should i do to display the data Any Help would be deeply appreciated