<?xml version="1.0" encoding="UTF-8"?><api:function-page xml:base="/apidoc/8.0/cts.contains.xml" generated="2015-10-07T16:36:00.016766-07:00" mode="javascript" xmlns:api="http://marklogic.com/rundmc/api"><api:function-name>cts.contains</api:function-name><api:suggest>cts.contains</api:suggest><api:suggest>cts</api:suggest><api:suggest>contains</api:suggest><api:function-link mode="xquery" fullname="cts:contains">/apidoc/8.0/cts:contains.xml</api:function-link><api:function mode="javascript" name="contains" type="builtin" lib="cts" category="SearchBuiltins" subcategory="Search" hidden="false" bucket="MarkLogic Built-In Functions" prefix="cts" namespace="http://marklogic.com/cts" fullname="cts.contains"><api:summary>
  Returns true if any of a sequence of values matches a query.
</api:summary><api:params><api:param name="nodes" type="item()*"><api:param-description>
    The nodes or atomic values to be checked for a match. Atomic
    values are converted to a text node before checking for a match,
    which may result in an error if the value cannot be converted.
    <span class="javascript" xmlns="http://www.w3.org/1999/xhtml">If you pass in a single value, 
  it is treated as a ValueIterator with that single item; therefore, if you 
  pass in an array, the function will return the array. If you mean to check 
  the values of each item in the array, then you can call 
  <a href="./xdmp.arrayValues">xdmp.arrayValues</a> on the array. </span>
  </api:param-description><api:param-name>nodes</api:param-name><api:param-type>ValueIterator</api:param-type></api:param><api:param name="query" type="cts:query"><api:param-description>
    A query to match against.  If a string
   is entered, the string is treated as a <code xmlns="http://www.w3.org/1999/xhtml">cts:word-query</code> of the
   specified string.
  </api:param-description><api:param-name>query</api:param-name><api:param-type>cts.query</api:param-type></api:param></api:params><api:return>Boolean?</api:return><api:example class="javascript"><pre xml:space="preserve" xmlns="http://www.w3.org/1999/xhtml">
var j = {"my-property":"hello"} ;
cts.contains(j, cts.jsonPropertyWordQuery("my-property", "hello"))

// returns true
</pre></api:example></api:function></api:function-page>