title: Find the string is XML or JSON or String using angular 2
body: <p>I need to find my string is XML or JSON object or string, based on this response I will make the string looks pretty. </p>
  
  <p>So for that, I need to identify what kind of object. Can anyone please help me to find a way to achieve this? </p>
  
  <p>Thanks in advance. </p>