regex - Javascript match changing the value of a different array -


I have problems with some combination arrays and match method below. I call the checkout () function on my page And it sets a temporary array equal to the array I created with different options. This is the threshold through the temporary array and removes the html in one of the elements. The issue is that when I remotely arrange the array. Alert the cart before the loop, as it was created at all, but when I call the function again, new updated values ​​are shown in the same warning, although I do not modify the remote I am here. Cart.products array anywhere in the function.

  function checkout () {tmp = null; Tmp = Remote. Cart Products; Warning (Remote Cart Product); (I = 0, li = tmp.length; i & lt; li; i ++) {for (j = 0, lj = tmp [i] [1] .length; j & lt; lj; j + +) {Tmp [i] [1] [j] [1] = tmp [ii] [1] [j] [1]. Milan (/lt; a \ s [^ & gt;] * href = "([^ \"] *) "[^ & gt;] *> (. *) & Lt; \ / a & gt; / I) [2];}}  

}

Your help / insight is greatly appreciated!

< Div class = "post-text" itemprop = "text">

Clint, you have to understand that for the same array of TMP and Remote.Cart.Products are different names, if you want to clone the array Do:

  var tmp = []; for (var i = 0; i & lt; remote.art.products.lamp; i ++) {Tmp [i] = [] (Var j = 0; j & lt; remote.kart.products [i]. Thumb; j ++) {tmp [i] [j] = []; for (var k = 0; of & lt; remote.kart.products [i] [j] length; k ++) {tmp [I] [j] [k] = remote.kart.products [i] [j] [k] .slis ();}}}  

Edit: nesting Thanks for squeezing


Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -