title: How to properly build and append a json file from variables
body: <p>I'm practising programming an application that takes user input and then outputs it to a json file.</p>
  
  <p>I found a how to that explains how to do it. For the sake of length, I'm leaving out the input code and just including the json builder.</p>
  
  <pre><code>  ASSIGN 
              uComp = "testCompany"
              uEmail = "testEmail"
              uName = "testName"
              uAdd = "Additional"
  
          .
  
  
            DEFINE VARIABLE myObj         AS JsonObject NO-UNDO.
            DEFINE VARIABLE myData        AS JsonObject NO-UNDO.
            DEFINE VARIABLE dataParams      AS JsonObject NO-UNDO.
            DEFINE VARIABLE lResult       AS LONGCHAR NO-UNDO
                VIEW-AS EDITOR LARGE SIZE 60 BY 16.
            DEFINE VARIABLE lJArray       AS JsonArray  NO-UNDO.
            DEFINE VARIABLE lAnotherArray AS JsonArray  NO-UNDO.
  
            OUTPUT TO "output path.json".
  
  
            myObj = NEW JsonObject().
            dataParams = NEW JsonObject().
  
  
  
            myObj:Add("id", "01").
  
            dataParams:Add("Company_name", uComp).
            dataParams:Add("uEmail", uEmail).
            dataParams:add("uName", uName).
            dataParams:add("AddInfo", uAdd).
  
  
            lJArray = NEW JsonArray().
            lJArray:Add(dataParams).
  
  
            myObj:Add("data", lJArray).
  
  
            myObj:Write(lResult, TRUE).
  
  
  
  
            DISPLAY lResult.
  </code></pre>
  
  <p>That part works fine, but my output is like so:</p>
  
  <pre><code>lResult-----------------------------------------------------
  
  {
    "id": "01",
    "data": [
      {
        "Company_name": "testCompany",
        "uEmail": "testEmail",
        "uName": "testName",
        "AddInfo": "Additional"
      }
    ]
  }
  
  </code></pre>
  
  <p>how do I prevent the </p>
  
  <blockquote>
    <p>lResult-----------</p>
  </blockquote>
  
  <p>from being added to the file.</p>
  
  <p>Secondly, I want to add additional information to the file when the code runs again so that the output will become.</p>
  
  <pre><code>{
    "id": "01",
    "data": [
      {
        "Company_name": "testCompany",
        "uEmail": "testEmail",
        "uName": "testName",
        "AddInfo": "Additional"
      },
       {
        "Company_name": "testCompany",
        "uEmail": "testEmail",
        "uName": "testName",
        "AddInfo": "Additional"
      }
    ]
  }
  
  </code></pre>
  
  <p>What is the correct way to target a point in the file and add additional objects?</p>
  
  <p>I though it might be something along the lines of an </p>
  
  <blockquote>
    <p>append</p>
  </blockquote>
  
  <p>property.</p>