title: How to read Map<String,List<String>> and get key and values in LWC JavaScript?
body: <p>The data is coming from Controller like <code>Map&lt;String,List&lt;String&gt;</code> and need to read the Map in the Javascript. I tried to use keyset() to get key, but it failed.</p>
  
  <p>Original data in the Map is :</p>
  
  <blockquote>
    <p>{"error":["Error Fields: (FirstName) : FirstName required.","Error
    Fields: (Phone) : Office Phone Number Required.","Error Fields: () :
    House Phone number required"]}</p>
  </blockquote>
  
  <p>In the above data, I wanted to loop the value List based on Key 'error'.</p>
  
  <h2>Edit</h2>
  
  <p>The above issue resolved by using the below solution. But now I have an issue to display the error message line by line in the HTML page. I used to divide the error message by using \n but and print in the console, it looks good. But when I pass to the HTML, it is again showing next to each other. Here is the code.                                                                 </p>
  
  <pre><code>result['error'].forEach( x=&gt;{                                   
                  errMsg += x+ '\n';
               });      
               this.showErrorMessage = true;
  </code></pre>
  
  <p>Result in console: </p>
  
  <pre><code>errorMessage*****
  
  FirstName Required.
  Office Phone Number Required.
  House Phone number required
  </code></pre>
  
  <p>But when displaying in HTML, it is displaying next to each other like this:  FirstName Required. Office Phone Number Required. House Phone number required.</p>
  
  <p>HTML code:</p>
  
  <pre><code>&lt;template if:true={showErrorMessage}&gt;
                          &lt;div&gt;
                              &lt;h6 style="color: red;"&gt;{errMsg }&lt;/h6&gt;
                          &lt;/div&gt;
  
                      &lt;/template&gt;
  </code></pre>