static async loadFromFile(filePath)
Loads JSON data from a file and returns a JsonManager instance.
Parameters:
filePath(string) – Path to the JSON file.
Returns:
Promise<JsonManager> – A new instance containing the loaded data.
Example:
1const jm = await JsonManager.loadFromFile("./data.json");
Edge Cases:
- Throws an error if the file does not exist or contains invalid JSON.