I have a json file with all my data inside and I also have a search box
But i would like to add pagination to the results page
I have found this helpful code here Simple pagination in javascript which shows how it can be done, but the problem is that my data is from a file called data.json
i've tried many things to try and get my data to pull through but none seem to work
the below does not work
$.getJSON('data.json', function(data) {
console.log('data',data);
});
this is my data
{"id":"1","name":"Name 1","channel_id":"37"},{"id":"2","name":"Name 2","channel_id":"41"},{"id":"3","name":"Name 3","channel_id":"37"},
Any help is appreciated.