How to store data in JSON file in Node-RED

I think that possibly an sqlite database might be a better solution for this. That is exactly what databases are designed for, storing information and then looking it up later in various ways.