I am collecting data from an api call. However the json structure is always changing, sometimes the fields have data, sometimes they are empty. it depends on how the API was classifying the data per webpage. There is a structure, but if they is little to no data on the page, the structure is light and vice versa.
How could I collect all the “text” maybe some other fields like “url” from the array without knowing when they are coming. Like a collect all?
I’m so confused at this point. So many iterators and aggregators, I’m probably way overcomplicating things.
Help?