How to execute Test Scripts for partial responses?

Your question may already have an answer on the community forum. Please search for related topics, and then read through the guidelines before creating a new topic.

Hi,

My API returns partial responses and postman displays it correctly:
I.E

{‘data’: [{key1: val1}]

{‘data’: [{key2: val2}]

{‘data’: [{key3: val3}]


When i try to parse this entire thing into JSON with:

let body = pm.response.json()

I receive an error about unrecognized token.

Is there a way to combine all the partial responses under the ‘data’ key and then run the test?

Or run the test for every partial response received?