This is a module that makes storing data on json files easier
var lazyjson = require("lazyjsonstorage")
var file = new lazyjson.JSONfile("test.json")
Inserts an object in the file.
JSONfile.insert(object)
Searches for (an) object(s) in the file.
console.log(JSONfile.search("key","value"))
console.log(JSONfile.search("key",""))
console.log(JSONfile.search("","value"))
console.log(JSONfile.search(object))
console.log(JSONfile.search(array[object,object...]))
//you can serialize searches
returns an array with the object(s) found
Removes (an) object(s) from the file.
JSONfile.remove("key","value",number)
JSONfile.remove("key","",number)
JSONfile.remove("","value",number)
JSONfile.remove(object,number)
returns the number of object(s) deleted
Edits (an) object(s) property(ies) in the file.
JSONfile.edit(object,object)
JSONfile.edit(array[object,object...],object)
/*the first argument is the object to edit and the second
argument is the property(ies) to change*/
returns the number of object(s) edited