could someone give me some direction on how to write a piece of JSON text in JavaScript. eg
{
"Header.MainsiteURL": "http://www.ford.es",
"Header.backToMainsiteMobile": "ES-Main site"
}
could someone give me some direction on how to write a piece of JSON text in JavaScript. eg
{
"Header.MainsiteURL": "http://www.ford.es",
"Header.backToMainsiteMobile": "ES-Main site"
}
You can declare a single Json object using the following syntax.
var person = {
Name: "NameOfPerson",
Age: 23
}
The following is a Json array for storing people's names and age.
var people = [
{
Name: "NameOfPerson",
Age: 23
},{
Name: "NameOfAnotherPerson",
Age: 12
}
]
What you seem to be missing in your example are the properties of the object.