title: How to find the sum of two columns in PowerShell?
body: <p>I'm attempting to create a PowerShell script that queries a website using an API that responds with JSON data.  I then want to get the sum of two columns that are selected. I'm new to PowerShell scripting and this seems simple but I can't find the answer.  Hoping someone can help.</p>
  
  <p>An example of the returned JSON from the API:</p>
  
  <pre><code>{"getuserbalance":{"version":"1.0.0","runtime":4.3599605560303,"data":{"confirmed":0.05500048,"unconfirmed":0.00472891,"orphaned":0}}}
  </code></pre>
  
  <p>This is what I have so far:</p>
  
  <pre><code>$balance = 'www.example.com/index.php?page=api&amp;action=getuserbalance'
  Invoke-WebRequest $balance |
  ConvertFrom-Json |
  Select -expand getuserbalance |
  select -expand data |
  select confirmed, unconfirmed
  </code></pre>
  
  <p>Which gives me:</p>
  
  <pre><code> confirmed unconfirmed
   --------- -----------
   0.05500048  0.00472891
  </code></pre>
  
  <p>Unsure about how to add these two together. I looked at the Measure-Object cmdlet but didn't see a way to sum two columns.</p>
  
  <p>Your help is appreciated.</p>
  
  <p>Thanks,</p>
  
  <p>Dragnan</p>