var pipe_delimited_string = string_array.join("|");
Array.join
is a native Array
method in Javascript which turns an array into a string, joined by the specified separator (which could be an empty string, one character, or multiple characters).
More Related Contents:
- Concat two arrays But concat is not working
- Creating a JavaScript global array with static elements?
- Converting a JS object to an array using jQuery
- Convert array to JSON
- Remove array element based on object property
- javascript filter array of objects
- How to find index of all occurrences of element in array?
- How to get a number of random elements from an array?
- How to find if an array contains a specific string in JavaScript/jQuery?
- Get the index of the object inside an array, matching a condition
- Merge 2 arrays of objects
- Sort mixed alpha/numeric array
- How to change value of object which is inside an array using JavaScript or jQuery?
- Merge Two Arrays so that the Values Alternate
- Generate unique number within range (0 – X), keeping a history to prevent duplicates
- Array Like Objects in Javascript
- Convert simple array into two-dimensional array (matrix)
- Best way to convert string to array of object in javascript?
- Convert html table to array in javascript
- Convert javascript array to string
- How to loop through array in jQuery?
- How to find the indexes of all occurrences of an element in array?
- How to get an Array with jQuery, multiple with the same name
- Convert js Array() to JSon object for use with JQuery .ajax
- How to find a value in an array of objects in JavaScript?
- JavaScript Multidimensional Arrays [duplicate]
- Using jQuery inArray with array of JavaScript Objects
- How to flatten array in jQuery?
- javaScript: Can a comma occur after the last set of values in an array?
- How to put all elements’ content in array using jQuery ?