title: Scala - Convert map key value pair to string
body: <p>I have to convert Map to string with given 2 delimiters and I wanted to use my own delimiter </p>
  
  <p>I have done with the below code </p>
  
  <pre><code>Map("ss"-&gt; "yy", "aa"-&gt; "bb").map(data =&gt; s"${data._1}:${data._2}").mkString("|")
  </code></pre>
  
  <p>The out out is ss:yy|aa:bb</p>
  
  <p>I'm looking for the better way.</p>