title: One liner *NIX command to pipe JSON object keys as arguments to shell command
body: <p>I would like to have node modules installed only when you are setting up the test environment. The <code>devDependencies</code> and <code>optionalDependencies</code> will still install if you run <code>npm install &lt;the-module&gt;</code>. Instead, I will store these in <code>testDependencies</code>. To do this it would be nice if there was a *NIX one-liner to get the keys from the JSON object, and pipe that into the <code>npm install</code> command. This can be used for travisci and makes it so the default installation doesn't install these extra libraries.</p>
  
  <p>How do you read the package.json file, extract keys to get module names, and run <code>npm install &lt;keys&gt;</code>? The package.json would look pretty much like this:</p>
  
  <pre><code>{
    "name": "the-module",
    "dependencies": {
      "express": "2.x"
    },
    "devDependencies": {
      "ejs": "&gt;= 0.6.1"
    },
    "testDependencies": {
      "mocha": "&gt;= 0.8.1",
      "chai": "&gt;= 0.3.3",
      "sinon": "&gt;= 1.3.1"
    }
  }
  </code></pre>
  
  <p>The command to run would be this:</p>
  
  <pre><code>npm install mocha chai sinon
  </code></pre>
  
  <p>Trying to do something like this:</p>
  
  <pre><code>npm install $(read-json ./package.json | extract-keys)
  </code></pre>