It doesn't matter how i try to fix formatting (adding comma between entries, removing spaces, EOL, NL characters) the JSON parser outputs an error (on a position in the file) and fails. I suspect that the JSON parser may not be able to manage nested objects and need one to one between entries in file and object created.
Thanks Steve ! I just realized that after I read some more posts here. I do not really like to pre-process a file and would like it to be "JSON" formatted on write..problem is that the file-out node only can do append omitting both [ and ] and the JSON node formats output for one object (omitting the comma that is needed to separate objects). So i think my question was the wrong one...how can i easily store a series of objects in JSON format in a file which i easily can read and convert to an object array for further processing ?
as you note they are just written to the file one line at a time... so to handle that - set the file in node to also read one line at a time - then pass to the json node to retrieve each "line" of information
Thanks...but sort of removes the need for JSON. Then it is likely easier to go with a Database-solution using SQLITE (where I can query the db for the records I am interested in)...
Thanks ! My overall goal is to have a "logbook" stored that contains name, place, start time and stop time. In parallell i have InfluxDB storing a set of weather parameters connected to "place". I want (on user input) collect all entries related to that user from "logbook" and for each entry lookup weather parameters and report on that back to user (either UI or short Telegram message). I hope that made some sense at least
The place should be a tag in the influx weather records, so then you can query the influx data for records for a particular place. Possibly that is what you have already.
Why are you not storing the logbook data in influx too?
Maybe i had a flaw in my thinking since I only considered Influx for measurements and not key/value store. I looked to influx due to the ease of getting measurements in/out based on time buckets. Maybe it can store the "logbook" as well..