JavaScript has no concept of "namespaces" in the sense of Java etc. Instead we use good old objects, and add attributes to those objects.
If root is to be your "namespace", we define root as an object, and define the members of the namespace as members on the object ("person", "home", "relative").
To declare an object (for root), the easiest way is to use object literal syntax
var root = {
    person: 'Jim',
    home: 'London'
}
You can nest objects using this syntax as follows (to achieve your nested relative object:
var root = {
    person: {
        'first_name': 'Matt',
        'last_name': 'Smith'
    },
    home: {
        relative: 'Frank'
    }
}