Hi Nived,
Maybe it would help if I show you what flow I'm using. You can download the flow from here
Here is the Parse JSON bit:

In my flow example, I am using this PDF file - Download here
Now imagine in my scenario, that this PDF contained all the invoices for the company and it had several sheets per supplier. I want to be able to filter on text so that all invoices by company marked 'Halliby' are exported into a separate pdf file.
For this I want to try and do the following:

However, when I try it this is what I get:

The execution of template action 'searchArray' failed: The evaluation of 'query' action 'where' expression '@contains(item()?['Text'], 'Halliby')' failed: 'The template language function 'contains' expects its first argument 'collection' to be a dictionary (object), an array or a string. The provided value is of type 'Null'.'.
When I inspect the output of the previous action, I can see that the field is exported from the PDF correctly:

So that's from the example scenario. I'm basically trying to do similar except our site codes are in the format of Finance (Hero)
where (Hero) is our site code.