title: How to replace ' / ' with '-' inside ObservableArray ? Knockout js
body: <p>Well i am trying to pass an observable array via ajax call to my controller but i get every value there except date . i get something like '01-01-01' etc . </p>
  
  <p>I found the issue but unable to fix that as i dont know how to replace <code>/</code> with <code>-</code> . </p>
  
  <p>My ObservableArray have around 10 list items each list item holds a many properties out of those <code>startDate</code> holds the date like <code>("23/10/2014")</code> . i just need something like <code>("23-10-2014")</code> .</p>
  
  <p>Tought of posting my function's and more i hope thats not required in this case i believe .</p>
  
  <p><strong>Let me explain with bit of code and sample data :</strong> </p>
  
  <pre><code>function myarray()
  {
  var self=this;
  self.startDate=ko.observable("");
  self.name=ko.observable("");
  self.place=ko.observable("");
  }
  </code></pre>
  
  <p><strong>MyObservableArray :</strong> </p>
  
  <pre><code>self.Main= ko.observableArray();
  </code></pre>
  
  <p>In between i do some stuff to load Data into <code>self.Main</code> and i am sending self.Main to controller having data like below :</p>
  
  <pre><code>self.Main[0] holds : 
  
  startDate() --&gt;gives you  "23/10/2014" //individual observables inside onservable array
  name() --&gt; "jhon"
  place()--&gt; "croatia"
  </code></pre>
  
  <p>Likely </p>
  
  <pre><code>self.Main[9] holds :
  startDate() --&gt; "29/05/2012" 
      name() --&gt; "pop"
      place()--&gt; "usa"
  </code></pre>
  
  <p>I am trying like i want to alter the self.Main() and replace the startDate and use the same self.Main to send to my controller . Once after replacing in <code>self.Main</code> when i check date the <code>/</code> should be replaced with <code>-</code> .</p>
  
  <p><strong>Possible solution :</strong> i can use a different observable array and push all the VM's of <code>Main</code> into it but i am trying to do on <code>self.Main</code> without using other . </p>
  
  <p>If someone can show some light it is much appreciated .</p>