I would like to store each element of the array into separate lines when storing it into NEDB database. Basically using some kind of "\r\n", after every element, as following:
I am basically doing this, right now
usernames = ["name1","name2","name3","name4"]
database.insert({User: usernames})
output:
"User":[["name1","name2","name3","name4"]],"_id":"mNQxEYnTap6QjmQH"}
I have tried chopping the array into using slice and even using \r\n, after every element, but it is still not working, since NEDB doesnt "care" about formatting, as far as i am aware.
My desired output:
"User":[["name1"]],"_id":"..."}
"User":[["name2"]],"_id":"..."}
"User":[["name3"]],"_id":"..."}
"User":[["name4"]],"_id":"..."}
(It is worth mentioning that the data is dynamic, since it is scraped data and there are a few 00' "users")
Any ideas would be highly appreciated.