{"id":4280,"date":"2024-01-23T14:25:52","date_gmt":"2024-01-23T14:25:52","guid":{"rendered":"https:\/\/ibex.tech\/javascript\/?p=4280"},"modified":"2024-01-23T14:26:55","modified_gmt":"2024-01-23T14:26:55","slug":"comma-separated-strings","status":"publish","type":"post","link":"https:\/\/ibex.tech\/javascript\/text\/comma-separated-strings","title":{"rendered":"Comma Separated Strings"},"content":{"rendered":"\n<h4 class=\"wp-block-heading\">Convert comma separated string to array<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>  let MyString = 'ab,cd,ef';\r\n  let MyArray = new Array();\r\n  MyArray = MyString.split(\",\");<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Convert array into comma separated string<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>  let MyString = MyArray.join(\", \")<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Convert comma separated string to array Convert array into comma separated string<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[326,62],"tags":[],"class_list":["post-4280","post","type-post","status-publish","format-standard","hentry","category-array","category-text"],"_links":{"self":[{"href":"https:\/\/ibex.tech\/javascript\/wp-json\/wp\/v2\/posts\/4280","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ibex.tech\/javascript\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ibex.tech\/javascript\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ibex.tech\/javascript\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/ibex.tech\/javascript\/wp-json\/wp\/v2\/comments?post=4280"}],"version-history":[{"count":2,"href":"https:\/\/ibex.tech\/javascript\/wp-json\/wp\/v2\/posts\/4280\/revisions"}],"predecessor-version":[{"id":4283,"href":"https:\/\/ibex.tech\/javascript\/wp-json\/wp\/v2\/posts\/4280\/revisions\/4283"}],"wp:attachment":[{"href":"https:\/\/ibex.tech\/javascript\/wp-json\/wp\/v2\/media?parent=4280"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ibex.tech\/javascript\/wp-json\/wp\/v2\/categories?post=4280"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ibex.tech\/javascript\/wp-json\/wp\/v2\/tags?post=4280"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}