I have array items, Given below
writeFile1() {
this.testnames = [{name : "sheldon", age : "10"}, {name : "Simon", age : "11"}]
this.file.writeFile(this.file.tempDirectory, './assets/data/demo.json', JSON.stringify(this.testnames))
};
testnames:any;
I need to store "testnames" to the json file which is located at "assets/ data/ demo.json". so I dont know how to do! anyone know this please helpme out.
specification:
Ionic5
Angular 10