Share via


MobileServiceTable.where function

Applies a row filtering predicate to the query against the table.

mobileServiceTable.where(object);
mobileServiceTable.where(function() { /* defines projection */ });

Parameters

  • object
    Type: object

    JSON object that defines the row filter.

  • function
    Type: function

    Function that defines the row filter.

Return Value

Type: Query object

A query that can be further composed.

Example

This code executed a query that uses a JSON object to define a filter for completed items. The results are then bound to a control.

todoTable.where({ complete: false })
   .read()
   .done(function (results) {
       todoItems = new WinJS.Binding.List(results);
       listItems.winControl.itemDataSource = todoItems.dataSource;
   });      

.NET Framework Equivalent

Where

Requirements

Namespace

WindowsAzure.MobileServices

Library

MobileServices.js

See Also

Reference

MobileServiceTable object

Other Resources

Get started with data in Mobile Services
How to use an HTML/JavaScript client for Azure Mobile Services