title: how to transfer object data from express route to jquery
body: <p>I'm wondering if I can transfer the object data from the html view which is rendered from the server side route("res.render('view', {title: 'title', object: object_data})") to jquery.
  The reason why I asked this is I want to use this object on the other route which is triggered
  by click function which is controlled by jquery.</p>
  
  <p>I tried to make a jquery code like below, but it didn't work...</p>
  
  <pre><code>jQuery(document).ready(function($){
       $("#option0").click(function() {
          $.get('/other_route', {
              flag: 'all' data: object});
  </code></pre>
  
  <p>please help me TT</p>
  
  <p>and, this is what I made the object</p>
  
  <pre><code>exports.search_post =  [
  
      sanitizeBody('location').escape(),
      sanitizeBody('style').escape(),
      sanitizeBody('dateFrom').toDate(),
      sanitizeBody('dateTo').toDate(),
  
      (req, res, next) =&gt; {
  
      var reserv = new Reservation(
          {
              start_date: req.body.dateFrom,
              end_date: req.body.dateTo,
              customer: null,
              car: null,
              reservation_no: null,
          }
      )
  
      async.parallel({
  
          cars: function(callback) {
                  Car.find()
               .where('available_date')
               .gte(reserv.start_date)
               .lt(reserv.end_date)
               .exec(callback);
  
              },
          }, function(err, results) {
              if(err) {return next(err);}
              if(results==null) {
                  var err = new Error('Car not found');
                  err.status = 404;
                  return next(err);
              }
              res.render('car_list', {title: 'Available List', object: results.cars});
  
          });
      }
  ]
  </code></pre>