I have a list of hrefs with product data:name and it's id. First of all i removed prod Id that i'll use as separate variable. After this, the remained part of href should be used as the product name.
var prodHref = document.querySelectorAll('.widget-products-list-item-label');
var allHref = [];
for(var i=0;i<prodHref.length;i++){
allHref.push(prodHref[i].href.split('/')[5])
}
var prodName = [];
for(var i=0;i<allHref .length;i++){
prodName.push(allHref [i].slice(0, -1))
}
var prodNameNew=[];
for(var i=0;i<prodName .length;i++){
prodNameNew.push(prodName[i].slice(0, -1))
}
So, the final result is on the attached screen. N
How i have concatenate all the elements of each array in order to get new arrays in the following format: Nokia G20 4 64 Albastru, Motorola G60 gri etc Thank You