I’m having a really bad week…
I have a new API service that I call with a GET
request which returns the results for that day, as what they call a file with one JSON string per line, such as:
{"status":"XXXXXXXX","urn":"00001","edor":"XXXXXXXX","businessName":"XXXXXXXX"}
{"status":"XXXXXXXX","urn":"00002","edor":"XXXXXXXX","businessName":"XXXXXXXX"}
{"status":"XXXXXXXX","urn":"00003","edor":"XXXXXXXX","businessName":"XXXXXXXX"}
{"status":"XXXXXXXX","urn":"00004","edor":"XXXXXXXX","businessName":"XXXXXXXX"}
{"status":"XXXXXXXX","urn":"00005","edor":"XXXXXXXX","businessName":"XXXXXXXX"}
Although there are over 200 objects.
Previously with I could treat it as a list as it was formatted as an array (within square brackets) so I could iterate over each item in the list and save it to the database.
I can call the API and get the response, and all I want to do is save each of the 200 objects into the database.
But I cant find a way in codeless to differentiate between each object and save it. If I try and add the response to a list it just generates one item.
Could anyone suggest a solution to prevent me loosing the plot please?