Question: How take these two values: `240` and `245` from paging information `Showing 240 to 245 of 744 entries` in jQuery DataTables?

**Screenshot**
![](https://content.screencast.com/users/truefunrun/folders/Jing/media/0a420bac-e318-4475-823c-bc239279ee8c/2015-09-25_1803.png)

**My code:**

```
ajax: function (data, callback, settings) {
    var out = [];
    filterModel.Take = THERE_MUST_BE_FIRST_VALUE
    filterModel.Skip = THERE_MUST_BE_SECOND_VALUE
    var promise = filterService.getElectricityData(filterModel);
    promise.then(function(data) {
        for (var i = 0; i < data.length; i++) {
            var model = [];
            for (var j = 0; j < data[i].length; j++) {
                model.push(data[i][j]);
            }
            out.push(model);
        }

```

Answer: 
Use [`page.info()`](http://datatables.net/reference/api/page.info%28%29) to get paging information about the table.

```js
"ajax": function (data, callback, settings) {
   var api = new $.fn.dataTable.Api(settings);
   var info = api.page.info();

   filterModel.Take = info.start + 1;
   filterModel.Skip = info.end;

   // ... skipped ...
}

```
You can access by different ways

`$.fn.dataTable.settings`

```
// 240
var start = $.fn.dataTable.settings[0]._iDisplayStart;
// 5
var size  = $.fn.dataTable.settings[0]._iDisplayLength;
// 245
var end   = start + size;

```

jQuery selector `$("datatableId_info").text()`

```
/Showing (\d+) to (\d+) of (\d+) entries/.exec("Showing 241 to 245 of 744 entries");
Array [ "Showing 11 to 20 of 57 entries", "11", "20", "57" ]

```