How to filter / summarise a response based on a criteria nested two levels deep?

I have a response from an get all records query called certificates, enriched by some addons (farm, credits).

I want to filter my response where credits.status == ex_post. How can I achieve this?

Using the result I want to summ different data from that list like total_tonnesco2e with credit status ex_post

I tried dot notations, looping through the response and querying the response in the get records custom query. I couldnt get it to work. It should be a simple filter.

Can I even query only the records where this condition is true, because I only add it on after I get the response?

Many thanks



2 replies