I tried copy-pasting your text into a local file on my system, then used the JSON Reader to read it in. I had to change your quote characters to " instead of the “ and ” you have above to get it to work.
Thanks for the reply. I can read it in to KNIME (don’t know why the quotes went like that when I posted it), but i can’t work out how to convert the resultant JSON into a table (e.g. that i could load into a database)
I did get something that “worked” in the end, but it’s very ugly! This cannot be the best way to do it. I expect i could write something in Python to handle it, or even SQL for that matter, but i was really hoping for a visual solution using KNIME nodes.
If anyone can provide a best practise alternative, i’d be really grateful. If the answer is to do this in Python, is there a fairly simple code - I’ve not had a chance to experiment because the extension is not working for me and i suspect i have to re-install. Thanks
I extract the relevant array (records not column names), then i pivot the records into columns using JSON to table, filter out the rest of the JSON, and then transpose the created columns into rows (1 row per record now). I use 3 string replaces to get rid of brackets and quotes in the data, then split the data on a comma delimiter, filter out any columns i don’t need, add the column names in and then send it to a SQL table.
Ugly, ugly, ugly, but i just wanted to see if it could be done. i am sure someone out there will, after they have finished being appalled at my solution, provide a much simpler approach. thanks
The problem I had was that I couldn’t create the Collection Queries for the records. Once I created one for [Records][][] and then edited it, to change the * in the second square brackets to the column numbers, all was good!