title: SignalR Help passing a List<string> to client
body: <p>Using SignalR and had no problems until now. This may be a simple question but I'm stumped.</p>
  
  <p>I have a C# object below that I send to the client:</p>
  
  <pre><code>public class Message
  {
      // Notifications
      public string Title { get; set; }
      public string Content { get; set; }
      public int zoneCount { get; set; }
  
      public string CntrX { get; set; }
      public string CntrY { get; set; }
  
      // Polygon Overlays
      List&lt;string&gt;  pointList = new List&lt;string&gt;()
  }
  </code></pre>
  
  <p>I'll add to pointList that's defined in the C# object;</p>
  
  <pre><code>    pointList.Add(soveVarX, soneVarY);
  </code></pre>
  
  <p>And in my client (javascript) the SignalR message is received like this:</p>
  
  <pre><code> messenger.client.add = function (message){
   rmPoly = [{}];
  
      // And then to push...
  
         var sep = ',';
         var rmPoly = [];
              var len = messages.zoneCount;
              for (var i = 0; i &lt; len; i++) {
                  var obj = {
                     x: gPoints [0],
                     y: gPoints [1],
                 };
          rmPoly.push(obj); 
   };
  </code></pre>
  
  <p>I'm trying to push my pointList as an object to the object array called rmPoly in the client. So far I've tried this:</p>
  
  <pre><code>    var str1= message.pointList[0]; //&lt;------How to get the List object?
      var  gPoints = str1.split(",");
  </code></pre>
  
  <p>And then to push...</p>
  
  <pre><code>        var rmPoly = [];
              var len = messages.length;
              for (var i = 0; i &lt; len; i++) {
                  var obj = {
                     x: gPoints [0],
                     y: gPoints [1],
                 };
          rmPoly.push(obj); 
  </code></pre>
  
  <p>However message.pointList[0] has no value/undefined.</p>
  
  <p>Any suggestions or more viable solutions?</p>
  
  <p>Thanks vtotola for the answer!!... knew it was something easy I missed.
  Also this may help someone in the future.</p>
  
  <p>I was able to access the list in SignalR and push the object to array below:</p>
  
  <pre><code> messenger.client.add = function (message) {
      var str1;
      var gPoints;
      var rmPoly = [];
  
      var len = message.PointList.length;
      for (var i = 0; i &lt; len; i++) {
              str1 = message.PointList[i];
              gPoints = str1.split(",");
              rmPoly.push({ x: gPoints[0], y: gPoints[1] });
      };
     }
  </code></pre>