title: Programmatically define openLayers 4 ol.format.filter.and
body: <p>I am currently using OpenLayers v4.6.4.</p>
  
  <p>I am successfully using the ol.format.WFS to create my desired layer.</p>
  
  <pre><code>var featureRequest = new ol.format.WFS().writeGetFeature({
      srsName: 'EPSG:4326',
      featureNS: 'http://myserver',
      featurePrefix: 'locations',
      featureTypes: ['photos'],
      outputFormat: 'application/json',
      filter: ol.format.filter.and(
                  ol.format.filter.during('DATE', '2015-11-27T05:00:00Z', 
                                          '2015-12-31T05:00:00Z'),
                 ol.format.filter.exactTo('Category', 'Church')
             )
  </code></pre>
  
  <p>The filter is hard coded at this point.  What I need to be able to do is construct the ol.format.filter.and object using values in my dropdown boxes.  I have successfully created a function that outputs a string that exactly matches the above filter. When I physically copy the string output (filterString) from my function and paste it into the above featureRequest, I get the desired results.  If I reference filterString, I get an error when OL is trying to construct the filter.</p>
  
  <p>Is there something obvious I am missing?</p>