jquery.facetview2.js
// get the right facet from the options, based on the name
get the right facet from the options, based on the name
get the right facet from the options based on the name
function selectFacet(options, name) {
    for (var i = 0; i < options.facets.length; i++) {
        var item = options.facets[i];
        if ('field' in item) {
            if (item['field'] === name) {
                return item
            }
        }
    }
}
function selectFacet ( options , name ) { for ( var i = 0 ; i < options . facets . length ; i ++ ) { var item = options . facets [ i ] ; if ( 'field' in item ) { if ( item [ 'field' ] === name ) { return item } } } }
get the right facet from the options, based on the name
get the right facet from the options based on the name