Hi guys,
Been hunting the forums for an answer and cant find one so annoyingly I have to ask:
I have a flow that pulls a list of results from an API. This works. It then cleans up the JSON to only include these fields (thanks to these forums).
The next step is to store this into a MySQL database. All the examples and issues I can find on the forums are for where there is a single entry to be inserted (e.g. in the JSON below, if I was just inserting count.
Using the mysql node, I get that I need to add my MySQL query into msg.topic, in order to insert all these rows do I need to build these into a single query using a loop?
I'm fairly sure there is a better way, or am I missing something here?
The JSON data:
{"results":[
{"id":1,"subject":"","status":"new","created_at":"2019-08-20T21:42:38Z","description":"Foo Foo"},
{"id":2,"subject":"","status":"new","created_at":"2019-08-21T02:27:55Z","description":"Foo Bar"},
{"id":3,"subject":"","status":"new","created_at":"2019-08-21T02:27:55Z","description":"Bar Foo"}],
"count": 3
}