src/selectivity.js
function(id) {
        var items = this.items;
        if (items) {
            return Selectivity.findNestedById(items, id);
        } else if (id === null) {
            return null;
        } else {
            return { id: id, text: '' + id };
        }
    }
function(id) {
        var items = this.items;
        if (items) {
            return Selectivity.findNestedById(items, id);
        } else if (id === null) {
            return null;
        } else {
            return { id: id, text: '' + id };
        }
    }
function ( id ) { var items = this . items ; if ( items ) { return Selectivity . findNestedById ( items , id ) ; } else if ( id === null ) { return null ; } else { return { id : id , text : '' + id } ; } }
Returns the correct item for a given ID.

@param id The ID to get the item for.

@return The corresponding item. Will be an object with 'id' and 'text' properties or null if
the item cannot be found. Note that if no items are defined, this method assumes the
text labels will be equal to the IDs.
Returns the correct item for a given ID .