Answers for "how contvert array to string like implode in jquery"

0

how contvert array to string like implode in jquery

var value = { "aaa": "111", "bbb": "222", "ccc": "333" };
var blkstr = [];
$.each(value, function(idx2,val2) {                    
  var str = idx2 + ":" + val2;
  blkstr.push(str);
});
console.log(blkstr.join(", "));
Posted by: Guest on April-19-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language