I would like to inject this data in a JSON file, but I dont know how to do that. After that Ive to insert them in MongoDB.
Im french student, this one part of my final project of my studies. I Can traduce you some words if you dont understand.
I don't know what you mean by a JSON file, but to write data to a file look at the File nodes which are part of the standard node-red install.
I was thinking that if I put output data in a JSON file, it will be easier to store them in my DB..
But if they is a another way to do that, I want to know !
At the moment, Ive no idea how to send these data to my DB execpt with JSON
I still don't know what you mean by a JSON file. Exactly what do you want to put in the file, give us an example of what the data should look like.
I don't know about Mongodb.
[Edit] I have just corrected my question, I meant what do you want to put in the file, as the question now says.
There are many examples of mongoDB on this forum use the search.
When you find something & try it out - but get stuck, come back & ask specific questions.
The people on this forum are very helpful - but they wont do it all for you i'm afraid.
As for writing JSON to file (not sure why you want to - just put data straight into Mongo) but anyway - look at the node-red-contrib-flogger node - it handles writing Js objects as JSON to file nicely.
Though note that the data you showed in the debug at the start is not JSON, they are just strings.
Ok, I dont looking for the all code ! Il looking for solution to extract the data on the picture, its different.. so, how with which procede Can I extract these string ?
I just want to have these data in a file to store them in a DB, but Im Node Red beginner..
Do you have some extension files to advice me ?
What do you mean, extract the strings? They are there for you to do what you want with, you don't need to extract them. Have a read of the node-red docs on Working with Messages, it may be helpful.
Thanks, I will take a look
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.