title: Azure Logic App - Create Array with only one object
body: <p>I am getting data from a powershell script from an automation account. i use this data to create reports and alerts. in 90% of the cases it is an json array.</p>
  <p>So in my logic app i am going to parse the json and filter the array afterwards. i use the filtered data to create alerts based of the &quot;id&quot; in the filter. As i said in 90% of the cases this works perfectly.</p>
  <p>But, if i only get one object from the script instead of the array i was getting the error:</p>
  <pre><code>&quot;message&quot;: &quot;Invalid type. Expected Array but got Object.&quot;
  </code></pre>
  <p>i solved this on the Parse Json step with:</p>
  <pre><code>&quot;type&quot;: [
  &quot;object&quot;,
  &quot;array&quot;
  </code></pre>
  <p>]</p>
  <p>But now my &quot;filter Array &quot;is obviously not working anymore:</p>
  <pre><code>BadRequest. The 'from' property value in the 'query' action inputs is of type 'Object'. The value must be an array.
  </code></pre>
  <p>So i am trying to figure out how to solve this, is it possible to make an if/else statement and check if its an array or object?</p>
  <p>Or should i initialize an empty array variable and append the object into the array so the filter will still work?</p>