title: how to merge object of multiple json into one json file using node.js
body: <p>I have multiple json files which just want to merge particular object from them and then save it into new json file:
  for example: </p>
  
  <pre><code>one.json
  two.json
  ...
  </code></pre>
  
  <p><strong>and each json file is like this:</strong></p>
  
  <p><strong>one.json</strong></p>
  
  <pre><code>{
    "passed": 1,
    "fixtures": [
      {
        "name": "Getting Started one",
        "path": "testOne.ts"
      }
    ]
  }
  </code></pre>
  
  <p><strong>two.json</strong></p>
  
  <pre><code>{
    "passed": 1,
    "fixtures": [
      {
        "name": "Getting Started two",
        "path": "testTwo.ts"
      }
    ]
  }
  </code></pre>
  
  <p><strong>so my final json file should be like this:</strong></p>
  
  <p><strong>final.json</strong></p>
  
  <pre><code>{
      "passed": 2,
      "fixtures": [{
              "name": "Getting Started one",
              "path": "testOne.ts"
          },
          {
              "name": "Getting Started two",
              "path": "testTwo.ts"
          }
      ]
  }
  </code></pre>
  
  <p>do you have an idea what is the simple way to merge like this.</p>
  
  <p>node: json files is not just two but many so it is good to find every file which has a extension of json.
  it is good to do this in shell script or node.js.</p>
  
  <p>thanks.</p>