title: How do you serialize/parse a nested JSON array in Flutter/Dart if it has no name/key
body: <p>I'm working with a RESTful API that seems to be working and used in other applications that gives me something like this:</p>
  
  <pre><code> "notes": [
      [
        {
          "automaticNote": false,
          "contactId": 0,
          "caseFileId": 0,
          "dateCreated": "2019-05-02",
          "deletedTime": "2019-05-02T19:31:54.588Z"
        }
      ]
    ]
  </code></pre>
  
  <p>The double pair of square brackets means that one pair of the square brackets has no name/key associated with it. To make matters worse, <code>notes</code> is itself nested in some complex JSON.</p>
  
  <p>I tried using <a href="https://javiercbk.github.io/json_to_dart/" rel="nofollow noreferrer">JSON to Dart</a> but it throws an error. So really my question is, how do I serialize a JSON array that has no key/name?</p>
  
  <p>I'd normally do it like this:</p>
  
  <pre><code>    class Note {
    bool automaticNote;
    int contactId;
    int caseFileId;
    String dateCreated;
    String deletedTime;
  
    Note(
        {this.automaticNote,
        this.contactId,
        this.caseFileId,
        this.dateCreated,
        this.deletedTime});
  
    Note.fromJson(Map&lt;String, dynamic&gt; json) {
      automaticNote = json['automaticNote'];
      contactId = json['contactId'];
      caseFileId = json['caseFileId'];
      dateCreated = json['dateCreated'];
      deletedTime = json['deletedTime'];
    }
  
    Map&lt;String, dynamic&gt; toJson() {
      final Map&lt;String, dynamic&gt; data = new Map&lt;String, dynamic&gt;();
      data['automaticNote'] = this.automaticNote;
      data['contactId'] = this.contactId;
      data['caseFileId'] = this.caseFileId;
      data['dateCreated'] = this.dateCreated;
      data['deletedTime'] = this.deletedTime;
      return data;
    }
  }
  </code></pre>
  
  <p>But the double JSON array is throwing me off (and again, <code>notes</code> itself is nested in a more complex JSON object but for the sake of simplicity I did not include the whole thing here).</p>
  
  <p>Thanks!</p>