title: How to convert json string to array of custom object in json2typescript NPM node module in TypeScript
body: <p>I want to convert a JSON string to array of custom object using json2typescript NPM module. I have written the following code.</p>
  
  <pre><code>export class ValidationSummary {
  
      constructor(private column1: string, private column2: string, private column3: string,
          private column4: string, private column5: string, private column6: string,
          private column7: string) {
  
      }
  
      public get $column1(): string {
          return this.column1;
      }
  
      public set $column1(value: string) {
          this.column1 = value;
      }
  
      /** all getter and setter methods */
  
  }
  </code></pre>
  
  <p>I am writing the code in a TypeScript class.</p>
  
  <pre><code>import {JsonConvert} from 'json2typescript';
  const jsonConvert: JsonConvert = new JsonConvert();
  
          const valSummary: ValidationSummary[] = jsonConvert.deserializeObject(jsonString, ValidationSummary[]);
  </code></pre>
  
  <p>I am getting the following error message.</p>
  
  <blockquote>
    <p>An element access expression should take an argument.</p>
  </blockquote>
  
  <p>My json string is like this.</p>
  
  <pre><code>[
    {
      "column1": "Data-1",
      "column2": "Data-2",
      "column3": "Data-3",
      "column4": "Data-4",
      "column5": "Data-5",
      "column6": "Data-6",
      "column7": "Data-7"
    },
    {
      "column1": "Data-11",
      "column2": "Data-12",
      "column3": "Data-13",
      "column4": "Data-14",
      "column5": "Data-15",
      "column6": "Data-16",
      "column7": "Data-17"
    },
    {
      "column1": "Data-31",
      "column2": "Data-32",
      "column3": "Data-33",
      "column4": "Data-34",
      "column5": "Data-35",
      "column6": "Data-36",
      "column7": "Data-37"
    }
  ]
  </code></pre>
  
  <p>I want the object array in the following form.</p>
  
  <pre><code>const valSummary: ValidationSummary[] = 
             jsonConvert.deserializeObject(jsonString, ValidationSummary[]);
  </code></pre>