Configuration for the database
Delete the data
path leading to the data
Check for existing datapath
Find all specific entry in an array/object
base dataPath from where to start searching
method to filter the result and find the wanted entry. Receive the entry and it's index.
Find a specific entry in an array/object
base dataPath from where to start searching
method to filter the result and find the wanted entry. Receive the entry and it's index.
Convert a router style path to a normal path By default propertyName to search is "id"
router based path to a correct base path
name of the property to look for searchValue
Get the wanted data
path of the data to retrieve
Returns the index of the object that meets the criteria submitted. Returns -1, if no match is found.
base dataPath from where to start searching
value to look for in the dataPath
name of the property to look for searchValue
Return the index of the value inside the array. Returns -1, if no match is found.
base dataPath from where to start searching
value to look for in the dataPath
Same as getData only here it's directly typed to your object
path of the data to retrieve
Reload the database from the file
Only use this if you know what you're doing. It reset the full data of the database.
JSONDB Constructor