take

Take a given amount it items

Parameters

count Number

The number of items that should be taken

Returns

kendo.data.Query Returns a new instance of kendo.data.Query containing only the first count elements of the list

Example

<script>
    var query = new kendo.data.Query([
        { name: "Jane Doe", age: 30 },
        { name: "John Doe", age: 33 },
        { name: "Bob Smith", age: 25 },
        { name: "Alice Johnson", age: 28 }
    ]);
    
    var limitedQuery = query.take(2);
    var result = limitedQuery.toArray();
    // the result can be seen in the browser console.
    console.log(result); // Will contain only Jane Doe and John Doe
</script>
In this article
take
Not finding the help you need?
Contact Support