C# Converting json arrays using JsonUtility,

hey all!
I’m currently trying to convert an array from a json file to a c# array. I understand that it has to be parsed into a class structure like such:

Here is my Json file:

{
  "messages": [
    {
      "recipient_id": "Player1",
      "custom": {
        "Animate": "Start",
        "Text": "Say hi"
      }
    }
  ]
}

And here is my class structures:

[Serializable]
public class JsonClass
{
    public Messages[] messages;
    
}
[Serializable]
public class Messages{
    public string recipient_id;
    public Custom custom; 
}
[Serializable]
public class Custom
{
    public string Animate;
    public string Text;
}

I parse the json string using JsonUtility, and tried to print out the elements as such:

 public IEnumerator ParseMessage(string myJsonString){
        
        JsonClass MyJsonClass = JsonUtility.FromJson<JsonClass>(myJsonString);

        var id = MyJsonClass.messages[0];
        Debug.Log($"Players id: {id.recipient_id}");

        var texts = MyJsonClass.messages[1].custom.Text;
        Debug.Log($"Text: {texts}");

        var animates = MyJsonClass.messages[1].custom.Animate;
        Debug.Log($"Animate: {animates}");

        yield return null;
    }

I can get recipient_id to print, but not Text and Animate. Is this an issue with my class structure?

Any help is really appreciated! (Losing a lot of sleep over this),

Not an issue with class structure! Made the mistake of calling Message[1] when it is actually Message[0].
Also, JSONUtility is unable to parse the Json objects into the class structures. Only by using JSON.Net was I able to. (JSON .NET For Unity | Input Management | Unity Asset Store)

The new code is as such:

using Newtonsoft.Json;

...

    public IEnumerator ParseMessage(string myJsonString){

        JsonClass MyJsonClass = JsonConvert.DeserializeObject<JsonClass>(myJsonString);

        var id = MyJsonClass.messages[0];
        Debug.Log($"Players id: {id.recipient_id}");
 
        var texts = MyJsonClass.messages[0].custom.Text;
        Debug.Log($"Text: {texts}");
 
        var animates = MyJsonClass.messages[0].custom.Animate;
        Debug.Log($"Animate: {animates}");
 
        yield return null;
     
    }