score:1

Accepted answer
var userDefinedSeries = {
    "style":"normal",
    "color":"rgb(0, 0, 255)",
    "width":4,
    "uid":[["425780c9-9727-4c5d-9bc4-65ce3334b0aa"],["06a8a24e-6a59-43e0-89a4-9fe4db55cac5"],["e1c73a33-ba2c-4d8d-9751-3c336442da84"]],
    "data":[[2500,50000],[2500,40000],[3000,40000]],
    "product":[["Product 3"],["Product 1"],["Product 2"]],
    "name":"Subject Property","type":"scatterLine","$$hashKey":"object:91"};

     var newString = [];
     var string;
     var key = 0;

    userDefinedSeries.product.map(function(arrayCell) {
          string = arrayCell + "," + userDefinedSeries.data[key];
          string = string.replace(" ","-");
          newString.push(string);
          key++;
    });

    console.log(newString.join(" | "));

score:1

var newString = [];
var modifiedNames = userDefinedSeries.product.map(function(product, index) {
  var productString = product.map(function (p) {
    return p.replace(" ", '-');
  }).join(' ');
  newString.push(productString + ', ' + userDefinedSeries.data[index].join(', '));
});
console.log(newString.join(' | '));

score:1

    var newString = "";
    for(var i=0; i< userDefinedSeries.uid.length;i++){
        newString += userDefinedSeries.product[i];
        newString += ","+userDefinedSeries.data[i];
        newString += "|";
    }
    console.log(newString);// your required string

Related Query

More Query from same tag