I have a “Database” with a js Array. It looks like that:
export const UnterbauDaten=[
{
Id:1,
Name:"Schotter lose 0-32 mm Körnung",
Preis:68.58,
Bild:require("../Bilder/GartenBauArt/Schotter.jpg"),
}
]
now i want a function, that if i add a new fiel, i can see it there. It should look like that:
function addData(Data){
Do Some Code Here.
}
and if i look now at my Database it should look like that:
export const UnterbauDaten=[
{
Id:1,
Name:"Schotter lose 0-32 mm Körnung",
Preis:68.58,
Bild:require("../Bilder/GartenBauArt/Schotter.jpg"),
},
{
NEWDATA
}
]
are there any ways of doing it? Or would you recommend to quit that and just get an real database like sqlite oder firebase?
Basically tried everything and looked it up in the internet but i didnt find a way if its not an json or word file.
urim sulejmani is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.