title: Convert a string to JSON object
body: <p>I have a JsonString:</p>
  
  <pre><code>"baseAbilities":"[{"baseId":1,"name":"Focused Elemental Strike"}]"
  </code></pre>
  
  <p>I want to make it:</p>
  
  <pre><code>"baseAbilities":[{"baseId":1,"name":"Focused Elemental Strike"}]
  </code></pre>
  
  <p>So the it is easy for JSON utility to deserialise it. Any suggestions</p>
  
  <p>EDIT:</p>
  
  <p>This is basically a json object in the following Json String: </p>
  
  <p>{"data”: [{"id":9,"name":"Sam5","baseAbilities":"[{\"baseId\":1,\"name\":\"Focused Elemental Strike\"},{\"baseId\":9,\"name\":\"Cleanse\"}]"]}</p>
  
  <p>The backend developer saved JSON in a column baseAbilities as a string. Now I don't have the access to Back end APIs. So i need to convert this string baseAbilities to JSON so that I can access objects inside it.</p>
  
  <p>Now I use these classes to decode JSON:</p>
  
  <pre><code>[System.Serializable]
      class GetBAResult
      {
          public List&lt;bounceAbilityData&gt; data;
      }
  
      [System.Serializable]
      class bounceAbilityData
      {
          public int id;
          public string name;
          public string baseAbilities;
      }
  </code></pre>
  
  <p>And this is how I decode JSON:</p>
  
  <pre><code>GetBAResult P = JsonUtility.FromJson&lt;GetBAResult&gt;(w.text);
          for (int i = 0; i &lt; P.data.Count; i++)
          {
              Debug.Log(P.data[i].name);
              GameObject layoutGroupNameButton = (GameObject)Instantiate(prefabBAButton);
              layoutGroupNameButton.transform.SetParent(ParentPanel, false);
              layoutGroupNameButton.GetComponentInChildren&lt;Text&gt;().text = P.data[i].name;
              layoutGroupNameButton.GetComponent&lt;BounceAbilityButton&gt;().id = P.data[i].id;
              layoutGroupNameButton.GetComponent&lt;BounceAbilityButton&gt;().name = P.data[i].name;
              Debug.Log(P.data[i].baseAbilities);
          }
  </code></pre>
  
  <p>I need to get things inside baseAbilities such as "baseID" and "name"</p>