I need help retrieving data from a webserver that I don't have control over. I've searched online but haven't found a solution yet. I've tried various codes, with and without DataTables.
If anyone could provide guidance on where to go next, I would greatly appreciate it.
<script>
$(document).ready(function() {
$('#example').DataTable( {
"ajax": {
"url": 'https://Example.com',
"dataSrc": "",
"dataType": "jsonp"
},
"columns": [
{ "data": "name" },
{ "data": "description" }
]
} );
} );
</script>
When I execute the code on the webpage in Chrome and check the network tab in developer tools, I see the response to the URL request as:
[{"ID":10,"VIRTUAL":"No","QTY":2,"NAME":"Alto TS Sub 15\"","ALT_NAME":"Alto TS15","DESCRIPTION":"","MEMO":"","PRICEA":0,"PRICEB":0,"PRICEC":0,"PRICE_TYPE":"per Day","TAX_RATE":"0%","STATUS":"Active","CATEGORY":"Speakers","CATEGORY_ID":9,"CATEGORY_LFT":18,"CATEGORY_RGT":19,"IMAGE_ID":101,"IMAGE_URL":"https:\/\/www.hirehop.info\/uploads\/Alto-TS-Sub-15in\/1758_101.png","REPLACE_COST":300,"WEIGHT":"31 kg","WIDTH":0.451,"LENGTH":0.513,"HEIGHT":0.591,"SERVICE_INTERVAL":"P6M","PAT_INTERVAL":"P1Y","TEST_INTERVAL":"P6M","LOCATION":"Greenway Avenue","PART_NUMBER":"","BARCODE":"","LAST_UPDATE":"2019-09-30 21:42:15","MARKETING":1,"NOMINAL_CODE":"","LINKS":[],"CUSTOM_FIELDS":[]},{"ID":9,"VIRTUAL":"No","QTY":2,"NAME":"Electro-Voice ZLX-12P","ALT_NAME":"EV-ZLX12P","DESCRIPTION":"12\" Active PA Speaker","MEMO":"","PRICEA":0,"PRICEB":0,"PRICEC":0,"PRICE_TYPE":"per Day","TAX_RATE":"0%","STATUS":"Active","CATEGORY":"Speakers","CATEGORY_ID":9,"CATEGORY_LFT":18,"CATEGORY_RGT":19,"IMAGE_ID":100,"IMAGE_URL":"https:\/\/www.hirehop.info\/uploads\/Electro-Voice-ZLX-12P\/1758_100.png","REPLACE_COST":350,"WEIGHT":"15.6 kg","WIDTH":0.35,"LENGTH":0.35,"HEIGHT":0.65,"SERVICE_INTERVAL":"P6M","PAT_INTERVAL":"P1Y","TEST_INTERVAL":"P3M","LOCATION":"Greenway Avenue","PART_NUMBER":"","BARCODE":"3","LAST_UPDATE":"2019-09-30 21:27:27","MARKETING":1,"NOMINAL_CODE":"","LINKS":[],"CUSTOM_FIELDS":[]}]