title: How to separate JsonArray data
body: <p>I got confused how to separate <code>JsonArray</code> data. I want to separate the received chat messages so it appear one by one in each bubble not in becoming into one big bubble.  <br/>
  What am I supposed to do, to separate the data from each other? <br/>
  Can anyone please help me? Thanking you in advance.</p>
  
  <p>My json part of the code:</p>
  
  <pre><code>if(!content.equals("null")){
                          try{
                              JSONArray jArr = new JSONArray(content);
  
                                String messages="";
                                for(int i=0; i &lt; jArr.length() ; i++){ 
                                    JSONObject jObj = jArr.getJSONObject(i);
  
  
                                       String message = jObj.getString("message");
  
  
                                       messages += message+"\n";
  
                                }
  
                                showMessage(messages, false);
                          }catch(JSONException e) {
                              // TODO Auto-generated catch block
                              e.printStackTrace();
                          }
                      }
                      else{
                          Toast.makeText(ChatRoom.this, "Error", Toast.LENGTH_LONG).show();
                       }
  </code></pre>
  
  <p>Logcat:</p>
  
  <p><code>06-22 09:15:20.486: D/ADBUG(519): content: [{"firstname":"teach","message":"test"},{"firstname":"teach","message":"test"},{"firstname":"teach","message":"test"},{"firstname":"teach","message":"testing chat"},{"firstname":"teach","message":"percobaan"},{"firstname":"teach","message":"per"},{"firstname":"teach","message":"tesssssssssss"},{"firstname":"teach","message":"ddffs"},</code></p>
  
  <p>I want my data become like this:  <br/>
  <img src="https://i.stack.imgur.com/c5M1X.jpg" alt="enter image description here"></p>