title: Restangular - custom search - search within an array
body: <p>Lets assume I have an mongodb <code>items</code> collection looking like this (MongoLab):</p>
  
  <pre><code>{
      "_id": {
          "$oid": "531d8dd2e4b0373ae7e8f505"
      },
       "tags": [
          "node",
          "json"
      ],
      "anotherField": "datahere"
  }
  {
      "_id": {
          "$oid": "531d8dd2e4b0373ae7e8f505"
      },
       "tags": [
          "ajax",
          "json"
      ],
      "anotherField": "datahere"
    }
  </code></pre>
  
  <p>I would like to get all items where a <code>node</code> is within the <code>tags</code> array. 
  I've tried the below, but no success  - <strong>it is returning all items</strong> - no search performed?</p>
  
  <p>Plunker demo : <a href="http://plnkr.co/edit/BYj09TOGyCTFKhhBXpIO?p=preview" rel="nofollow">http://plnkr.co/edit/BYj09TOGyCTFKhhBXpIO?p=preview</a></p>
  
  <pre><code>// $route.current.params.id = "node" - should give me only 1 record with this tag
  Restangular.all("items").customGET("", { "tags": $route.current.params.id });
  </code></pre>
  
  <p>Full example, return same record for both cases:</p>
  
  <pre><code>    var all = db.all('items');
  
      // GET ALL
      all.getList().then(function(data) {
          $scope.all = data;
          console.log(data);
      });
  
      // SEARCH for record where "tags" has got "node"
      all.customGET('', { "tags": "node"}).then(function(data) {
          $scope.search = data;
          console.log(data);
      });
  </code></pre>
  
  <p>Any suggestion would be much appreciated.</p>