title: Convert string to array of objects React
body: <p>i have a problem how to convert String to array of objects.</p>
  
  <p>First things first:</p>
  
  <p>I am using Ace editor to capture code String that i want to pass to my axios call.</p>
  
  <p>when I am importing my data from local file</p>
  
  <pre><code>let data = [
      { data: `some XML`},
      { data: `some XML`},
    ];
  
  export default data;
  </code></pre>
  
  <p>I iterate this array and send async each item. which is ok.</p>
  
  <p>but I do not want to use the file I want to be able to somehow paste this into Ace editor and then pass it to my call.</p>
  
  <p>BUT Ace editor is capturing this as a String</p>
  
  <p>so it is not valid Array and it has no objects init to iterate. it is just a string. Even if i place it in array state it looks like this array has only one big string in it.... not separated objects.</p>
  
  <pre><code>["[
      {data: `some XML`},
      {data: `some XML`},
    ];"]
   "[
      {data: `some XML`},
      {data: `some XML`},
    ];"
  </code></pre>
  
  <p>is there any way to have array of object again?</p>