Q:

Javascript Object properties in a separate file

I have a JavaScript object with thousands of properties and what i want if possible  is to have these properties in a separate file (lets say a txt) so that the admin of the system will be able to make changes at his will without messing with the code.
Is this possible?
thanks

A:

Yes, this is a perfect application for JSON (Javascript Object Notation). It allows you to store name/values pairs in a tree structure that acts as a "mini database". It's lightning fast, easy to navigate, and is widely used in may platforms.
{
    "glossary": {
        "title": "example glossary",
        "GlossDiv": {
            "title": "S",
            "GlossList": {
                "GlossEntry": {
                    "ID": "SGML",
                    "SortAs": "SGML",
                    "GlossTerm": "Standard Generalized Markup Language",
                    "Acronym": "SGML",
                    "Abbrev": "ISO 8879:1986",
                    "GlossDef": {
                        "para": "A meta-markup language, used to create markup languages such as DocBook.",
                        "GlossSeeAlso": ["GML", "XML"]
                    },
                    "GlossSee": "markup"
                }
            }
        }
    }
}

