title: How can I add a child node to an existing json file through node js?
body: <p>I am using ExpressJS to write my application and jsonfile (<a href="https://www.npmjs.com/package/jsonfile" rel="nofollow noreferrer">https://www.npmjs.com/package/jsonfile</a>) to handle json files. I have this following json file:</p>
  
  <pre><code>{
    "news": [
      {
        "id": "1",
        "title": "News 1 heading",
        "description": "Lorem ipsum dolor sit amet upidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
        "dateposted": "00188292929"
      },
      {
        "id": "2",
        "title": "News 2 heading",
        "description": "Lorem ipsum dolor sit amet",
        "dateposted": "00188292929"
      }
    ]
  }
  </code></pre>
  
  <p>Now, I want to add another set of news under the "news" node, so that my final json looks like this:</p>
  
  <pre><code>{
        "news": [
          {
            "id": "1",
            "title": "News 1 heading",
            "description": "Lorem ipsum dolor sit amet upidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
            "dateposted": "00188292929"
          },
          {
            "id": "2",
            "title": "News 2 heading",
            "description": "Lorem ipsum dolor sit amet",
            "dateposted": "00188292929"
          },
          {
            "id": "3",
            "title": "News 3 heading",
            "description": "Lorem ipsum dolor sit amet",
            "dateposted": "00188292929"
          }
        ]
      }
  </code></pre>
  
  <p>There is an append flag with jsonfile but it appends at the end of the file rather than under a given node. How can I append the data under and existing node? Do, I need to stringify the json, add data and JSONfy it? or there is a more direct way?</p>
  
  <p>Thanks.</p>