title: How to test if an array of objects contains a string?
body: <p>In C# I can do this:</p>
  
  <pre><code>public string[] MyStrings;
  ...
  ...
  if(MyStrings.Contains("bob")) ...
  </code></pre>
  
  <p><strong>In ObjectScript how is this done?</strong> </p>
  
  <p>With <code>%ArrayOfObjects</code> type I don't see exactly what I am looking for <a href="http://docs.intersystems.com/cache20122/csp/documatic/%25CSP.Documatic.cls?APP=1&amp;LIBRARY=%25SYS&amp;CLASSNAME=%25Library.ArrayOfObjects" rel="nofollow">here</a></p>
  
  <p>What I have tried:</p>
  
  <pre><code>#Dim MyStrings As %ArrayOfDataTypes
  do MyStrings.SetAt("User","User")   
  do MyStrings.SetAt("Users","Users")
  do MyStrings.SetAt("Group","Group")
  do MyStrings.SetAt("Groups","Groups")
  
  // if MyStrings contains Groups
  if MyStrings.GetAt("Groups") '= ""
  {
  }
  </code></pre>