title: Why does ConvertFrom-Json produce an Object which turns into a PSCustomObject after assignment? And how do I shortcut that?
body: <p>I have a simple json file as follows:  </p>
  
  <pre><code>[
      {"ClientName": "Test Site 1", "ClientID": "000001"},
      {"ClientName": "Test Site 2", "ClientID": "000002"},
      {"ClientName": "Test Site 3", "ClientID": "000003"}
  ]
  </code></pre>
  
  <p>When I use the following PowerShell command:</p>
  
  <p><code>ConvertFrom-Json (Get-Content TestSites.json -Raw)</code></p>
  
  <p>I get back a <code>System.Object[]</code>.  This doesn't allow me to pipe the output to another function I have which accepts "ClientName" and "ClientID" parameters.</p>
  
  <p>However, when I assign that object to another variable, like this:</p>
  
  <p><code>$myobj = ConvertFrom-Json (Get-Content TestSites.json -Raw)</code></p>
  
  <p><code>$myobj</code> is actually a <code>System.Management.Automation.PSCustomObject</code> which is capable of being passed to my function.</p>
  
  <p>How can I just pipe the results of the original command without having to assign it to another variable first?</p>
  
  <p>I hope that makes sense.</p>