So, I have my JSON file:
{
HomeWork: []
}
And I want to push an object:
{Title: T, Due: D, Description: Desc}
To the JSON file, How should I do that? I am using this right now:
async function AddWork(obj) {
workData.HomeWork.push(obj);
//RNFS.writeFile('../../json/work.js', JSON.stringify(workData));
}
I tried whit the RNFS line, but it did not help.