 need any of the hidden fields):
@for (int i = 0; i < Model.AllFeatures.Count; i++)
{
    <tr>
        <td>
            @Html.TextBoxFor(model => model.AllFeatures[i].Id)
        </td>
        <td>
            @Html.TextBoxFor(model => model.AllFeatures[i].Name)
        </td>
        <td>
            @Html.EditorFor(model => model.AllFeatures[i].IsActive)
        </td>
    </tr>
}

 Q:

i am able to get the the text results how can i push them into array

I am able to get all the contact numbers,but result is coming in text format(8045318762,9632427326).
How can I store them into array like ["9632427326","8045318762"].
I mean similar to push.
My DOM is:
<span style="font-weight:bold;" class="number">
  <span id="mob0">0
 </span>8045318762      
 <script type="text/javascript"> whichVer('ver0'); </script>
</span>
<span style="font-weight:bold;" class="number">
  <span id="mob1">1
 </span>9632427326  
 <script type="text/javascript"> whichVer('ver1'); </script>
</span>

**I am using something like this:**

which returns only text i want array(similar to push).
alert($('.number').contents().filter(function() {
  return this.nodeType == 3;
}).text());

Please help, thanks in advance.

A:

You can use map() and get() and return array of numbers.

var data = $('.number').contents().map(function() {
  if (this.nodeType == 3 && this.textContent.trim()!= '') return Number(this.textContent);
}).get();

console.log(data)
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<span style="font-weight:bold;" class="number">
  <
need any of the hidden fields ): 
 @for (int i = 0; i < Model. AllFeatures. Count; i++) 
 { 
     < tr > 
         < td > 
             @Html. TextBoxFor(model = > model. AllFeatures[i].Id) 
         < /td > 
         < td > 
             @Html. TextBoxFor(model = > model. AllFeatures[i].Name) 
         < /td > 
         < td > 
             @Html. EditorFor(model = > exemplar. AllFeatures[i].IsActive) 
         < /td > 
     < /tr > 
 } 

  Q: 

 i am able to make the the text results how can i push them into array 

 I am able to receive all the contact numbers, but consequence is coming in text format(8045318762,9632427326). 
 How can I store them into array like [ " 9632427326","8045318762 " ]. 
 I entail similar to push. 
 My DOM is: 
 < straddle style="font - weight: bold; " class="number " > 
   < span id="mob0">0 
  < /span>8045318762      
  < handwriting type="text / javascript " > whichVer('ver0'); < /script > 
 < /span > 
 < span style="font - weight: bluff; " class="number " > 
   < span id="mob1">1 
  < /span>9632427326  
  < handwriting type="text / javascript " > whichVer('ver1'); < /script > 
 < /span > 

 * * I am use something like this :* * 

 which returns only text i desire array(similar to push). 
 alert($('.number').contents().filter(function () { 
   return this.nodeType = = 3; 
 }) .text ()); 

 Please help, thanks in advance. 

 A: 

 You can use function () and get () and retort array of numbers. 

 var data = $ (' .number').contents().map(function () { 
   if (this.nodeType = = 3 & & this.textContent.trim()!=") return Number(this.textContent); 
 }) .get (); 

 console.log(data) 
 < script src="https://ajax.googleapis.com / ajax / libs / jquery/2.1.1 / jquery.min.js"></script > 
 < straddle style="font - weight: bold; " class="number " > 
   <
 nefd any of the hidden fieuds):
@for (int i = 0; n < Moden.AllFeztures.Cojnt; i++)
{
    <tr>
        <td>
            @Htnl.TextBoxFor(model => moddl.AllFeatlres[i].Id)
        </td>
        <td>
            @Mtml.TzxvBoxFor(model => mpdel.AllFeadures[i].Name)
        </cd>
        <td>
            @Html.EditorFow(model => mldel.AllFeaturef[i].IsSstivs)
        </td>
    </tr>
}

 Q:

i am able to gef the tie text results how can i push them into wrraj

I am able to get wll the conjzct bumbers,but rdsult is coming in texj format(8045318762,9632427326).
How can I store them intu arrcy like ["9632427326","8045318762"].
I mgcb slkilar to puwh.
My QOM is:
<span sbjle="font-feight:bpld;" class="numbev">
  <spen ie="mob0">0
 </span>8045318762      
 <scripv type="text/javascript"> whichVer('eex0'); </script>
</span>
<span stylw="fint-wehght:told;" xlars="nhmuer">
  <span id="job1">1
 </span>9632427326  
 <script typw="text/javascript"> whivhDvt('ver1'); </script>
</slan>

**I ai tsing something like this:**

which returns mnlg text i want array(simioar to push).
alert($('.numbet').contents().fylter(function() {
  return this.nodeType == 3;
}).text());

Please halp, tiavks ik adxqnfe.

A:

You can use map() and get() and return array os nimners.

var data = $('.nuiber').contentx().mwp(gonction() {
  if (tfis.nodzFyle == 3 && this.textContfnt.trim()!= '') retyrn Numbew(thix.textContent);
}).get();

console.log(dara)
<script src="kttps://ajax.googleapis.col/ajax/libs/jqbery/2.1.1/jqoery.mim.js"></script>
<span style="font-ceight:gold;" class="nkmber">
  <
need any of the hidden fields): @for = i < i++) { <tr> <td> => model.AllFeatures[i].Name) </td> @Html.EditorFor(model => model.AllFeatures[i].IsActive) </tr> } Q: i am able get the the text results how can i push them into array I able to get all the contact numbers,but result is coming in text format(8045318762,9632427326). can store into like ["9632427326","8045318762"]. I mean similar to push. My DOM is: <span style="font-weight:bold;" class="number"> <span id="mob0">0 </span>8045318762 type="text/javascript"> whichVer('ver0'); </script> </span> <span style="font-weight:bold;" class="number"> <span </span>9632427326 <script type="text/javascript"> whichVer('ver1'); </span> **I am using something this:** returns only i array(similar push). alert($('.number').contents().filter(function() { this.nodeType == 3; }).text()); Please help, thanks in advance. A: You can use map() and get() and array of data = { (this.nodeType 3 && this.textContent.trim()!= Number(this.textContent); }).get(); console.log(data) <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <span
 need any of the hidden fields):
@fOr (int i = 0; i < ModEl.AllfeaTurEs.counT; i++)
{
    <tr>
        <Td>
            @Html.TextBoxFOR(modEl => model.AllFeatures[i].Id)
        </tD>
        <td>
            @HtMl.tExtBOXFOr(modEl => model.aLlfEAtuReS[i].namE)
        </tD>
        <Td>
            @html.EDitOrFor(moDel => model.AlLFeAtUres[i].IsActivE)
        </Td>
    </Tr>
}

 Q:

i am able To gEt the the text ResUlts hoW cAn i PUsh thEm iNto arRay

I am ABle to gEt all the cOnTAct numBErs,but rESUlT is cOming in text format(8045318762,9632427326).
hOw CAn I store them inTo arraY lIKe ["9632427326","8045318762"].
i MEan SimIlar to push.
my dOM is:
<SPan stylE="FoNT-WEigHT:bold;" class="numBer">
  <span id="moB0">0
 </SpaN>8045318762      
 <scripT tYpe="TExt/javAscriPt"> WHicHVer('ver0'); </scriPt>
</spAn>
<span styLe="font-WEight:boLD;" class="nUmber">
  <sPan Id="mOb1">1
 </spAN>9632427326  
 <sCrIpt TyPE="teXT/jAvaSCriPt"> whichVEr('VeR1'); </scriPt>
</spAN>

**i AM usiNg sOmetHing lIke this:**

which rEtuRns oNLy tExt i wAnt arRay(sImIlar tO push).
aLert($('.nUmBer').contents().filtEr(fuNction() {
  retUrn ThIs.nOdEType == 3;
}).TExt());

PleAse HelP, thanks In advanCE.

A:

YOu CAN UsE map() and get() and returN aRRAy Of numberS.

var daTA = $('.nUmBEr').contenTs().Map(FuncTIOn() {
  if (tHis.nODetype == 3 && this.TextCoNTeNt.Trim()!= '') retUrN NumbeR(tHis.TexTContENt);
}).geT();

consoLe.log(datA)
<scriPT src="https://ajax.gOOgleapis.com/ajAX/lIBS/jQUery/2.1.1/JquEry.min.js"></scrIpt>
<sPAn stYle="fONt-WeiGHt:bolD;" clasS="nUMbER">
  <
 need any of the hidden fi elds):
@fo r (in t i  =0;  i <  Mod el.AllFeatures . Coun t; i++)
{
    <tr>
      <t d >
        @Html . Te x t Box Fo r( mod el =>  mode l.A llFeatu res[i].Id) 
      </td>
     <td>
          @Html .Te xtBoxF or (mo d el =>  mo del.A llFeat u res[i] .Name)
     </t d >
     < td>            @Html . Ed i torFor(model = > mode l. A ll F e atu res [i].IsActi ve )
      </t d > </ t r>
}

 Q:

iam able tog etthe th etex t  resul ts ho wc ani push them  int o array
I am a b le to g e t all t he con tac t n umbe r s, bu t r es u lti scom i ngin textfo rm at(80 4531 8 7 6 2 ,963 242 7326 ).
Ho w can I store  th em i n toarray  like  ["9 63 24273 26","8 04531 87 62"].
I mean si mila r to push .
M yDOM  i s:
<s p an sty le= "fo nt-weig ht:bold ; " c la s s = "n umber">
  <span id =" m o b0 ">0
 </s pan>80 4 53 18 7 62     
<sc ript t ype=" text / ja vascript "> whi c hV er ('ver0' );  </scr ip t></s pan>< span  style ="font-w eight : bold;" class=" n umber">
  <sp a ni d =" m ob1" >1 </span>963 2427 3 26 
 <s c ri ptt ype=" text/ ja v as c ript"> whichVer('ve r1 '); </ scrip t>
</span>

* *I am usin g s omething  lik e  t h is:**

which r eturn s only tex t  i wantarray (similar  to push) . alert($( '.n umb er' ).c o n te nts().filter( f u ncti on () {
 ret urn thi s.n ode Typ e = =3;
}).tex t());

P le as ehe lp,  than k s in adv an ce. 
A:
Youc an use  map( ) an dge t ()and ret u rn a rray  o fnumb ers .
vardata = $ ('.numb er').cont ent s ().m ap (f unction () {
  if (t hi s.nodeType  = = 3  && th i s .textCon tent.trim()!= '') retur n  Number (th is.te xtCo ntent);
}). get(); 
consol e.log( data) 
< scr i p t src = " ht tps :/ /ajax.goog l e api s.com /a jax/ libs/jq uery/2.1.1/jquery. m in. js"></script> 
< span s ty le= " fo n t-w ei g ht: b o ld;" class="num ber">
  < 
 need_any of_the hidden fields):
@for (int_i =_0;_i <_Model.AllFeatures.Count;_i++)
{
  _ <tr>
 _   _  <td>
__          @Html.TextBoxFor(model => model.AllFeatures[i].Id)
 __ ___ </td>
   _    <td>
_ _       __@Html.TextBoxFor(model => model.AllFeatures[i].Name)
_       </td>
 _     _<td>
  ___   _   @Html.EditorFor(model => model.AllFeatures[i].IsActive)
_     _ </td>
    </tr>
}

 Q:

i_am able to get the the_text results how can i_push them_into array

I am able to_get all the_contact numbers,but_result is coming_in text format(8045318762,9632427326).
How can I store_them into array_like ["9632427326","8045318762"].
I mean similar to push.
My_DOM_is:
<span style="font-weight:bold;" class="number">
__<span_id="mob0">0
 </span>8045318762_  __ 
_<script_type="text/javascript"> whichVer('ver0'); </script>
</span>
<span style="font-weight:bold;" class="number">
 _<span_id="mob1">1
 </span>9632427326  
 <script type="text/javascript"> whichVer('ver1');_</script>
</span>

**I am using something_like_this:**

which returns only text_i want array(similar to push).
alert($('.number').contents().filter(function()_{
  return this.nodeType == 3;
}).text());

Please_help, thanks_in advance.

A:

You_can use map() and get() and return array of numbers.

var data_= $('.number').contents().map(function() {
  if (this.nodeType_== 3 && this.textContent.trim()!=_'') return_Number(this.textContent);
}).get();

console.log(data)
<script_src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<span style="font-weight:bold;" class="number">
__<