MindFusion.Charting for JavaScript Programmer's Guide
IEnumerable.where Method
See Also
 






Filters a sequence of values based on a predicate.

Namespace: MindFusion.Common.Collections
File: IEnumerable.js

 Syntax

JavaScript  Copy Code

function where (selector)

 Parameters

selector

Type: function
function. A function to test each element for a condition.

 Return Value

IEnumerable. An collection that contains elements from the input sequence that satisfy the condition.

 Example

The following code uses the where function to search for an item in the collection of items in a TreeView:

JavaScript  Copy Code
var treeNode = treeView.flatItems.where(function (item) { if (item.data == d) return true; }).first();

 See Also

IEnumerable Members
IEnumerable Class
MindFusion.Common.Collections Namespace