title: passing variable from jQuery ajax to nodejs
body: <p>i am trying to pass a variable from jQuery to nodejs, but i am not getting the right results, nodejs returns [object Object]. how can it return a string variable on nodejs side. </p>
  
  <pre><code>  $('.test').click(function(){
        var tsId = "Hello World";
        alert(tsId);
        console.log(tsId);
        $.ajax({
          'type': 'post',
          'data':tsId,
          'url': '/test/testing',
          'success': function (data) {
              alert(data);
          }
        })
      });
  
  
   router.post('/testing', function(req, res) {
  
     var tsID = req.body;
     console.log("stsID "+tsID );\\ outputs [object Object]
  
   });
  </code></pre>