MindFusion.Charting for JavaScript Programmer's Guide
IEnumerable.where Method
See Also
Collapse All Expand All Language Filter: All Language Filter: Multiple Language Filter: None Language Filter: C# Language Filter: Visual Basic Language Filter: Java Language Filter: JavaScript Language Filter: C++ Language Filter: XAML

C#
Visual Basic
Java
JavaScript
C++
XAML

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