+ 1
How can I use JSON-Files in JavaScript?
Is where a direct way or do I have to use lib, if I want to keep it simple. Sorry if I overread the answer in course. Thanks for every answer.
2 odpowiedzi
+ 2
JSON is JavaScript Object Notation. You just create an Object in JavaScript similar to creating a dictionary in other languages like python.
var myObject = {
"name" : "John",
"age" : 32,
"occupation" : "Programmer"
};
You can use stringify to pass it as a string.
var myJSONObj = JSON.stringify(myObject);