title: Passing Query Parameters from HTML/JS App to Azure Server Script
body: <p>I am currently working on an HTML/JS App using Windows Azure Mobile Service.
  I have two tables, one storing information about an attraction [attractionTable(attractionId, address,...)] and one keeping track of which user likes which attraction [favoriteAttractionTable(attractionId, userId, fav(bool))].</p>
  
  <p>If the client wants to have a list of his favorite attractions there should only be one request to the server. On the server side I edited the read script of the favoriteAttractionTable to this: </p>
  
  <pre><code>function read(query, user, request) {
  
     var sql =
         "FROM routesTable rt, favoriteAttractionTable ft " +
          "WHERE rt.id = ft.routeId;";
  
      mssql.query(sql, {
          success: function(results) {
              request.respond(statusCodes.OK, results);
          }});
  
  }
  </code></pre>
  
  <p>In my JavaScript Code I am using the following request</p>
  
  <pre><code>function loadFavoriteAttractions(){
      favTable = client.getTable("favoriteAttractionTable");
      var query = favTable.where({
              fav: true,
          userId : 0
          }).read().done(function (results) {
              console.log(results);
          }, function (err) {
              alert("Error: " + err);
          });
  }
  </code></pre>
  
  <p>I basically get the information of all attractions that any user has added to his favorites but I want to modify the var sql in a way to receive only the ones related to the appropriate userId.</p>
  
  <pre><code>query.getComponents();
  </code></pre>
  
  <p>shows queryString: '((fav eq true) and (userId eq 0))' in my server script. 
  But I am wondering how I can access this information?!</p>
  
  <pre><code>request.parameters.fav
  </code></pre>
  
  <p>is supposedly undefined.</p>
  
  <p>Any advice is highly appreciated :)</p>