jquery - Ajax Count all hydra:totalItems -


i have make ajax counts month of submitted ticket, example, jan:4 tickets, feb:12 tickets, etc. here code:

function createdatchart(callback, createat) {     $.ajax({         url: '/api',         type: 'post',         data: {             module: 'helpdesk/tickets',             method: 'get',             // params: [{'createdat':createat}]             params: [                 {                     'createdat' : {                         'before': createat                     }                 }             ]         },         success: function (data, textstatus, jqxhr) {             var data = json.parse(data);             var total = data['hydra:totalitems'];             console.log(total); //output 68                 var d = moment(data.createdat).month();// output 8                 //8 means september                 createat = d;                         console.log('total = ', total); // output = 68                 if (callback) callback(d, total)         }     }); } 

the problem is, don't know how api. access ['hydra:member'], returns 18 data object, because paging. jsonld please enlighten me. appreciated.

edited hydra view here expanded hydra:view


Comments

Popular posts from this blog

ZeroMQ on Windows, with Qt Creator -

unity3d - Unity SceneManager.LoadScene quits application -

python - Error while using APScheduler: 'NoneType' object has no attribute 'now' -