Given the following object:
var object = {
'name': {
test: 'one'
},
'test.two': 'test',
'test.three.*': 'tes.two',
'testfour': {
'test.five': {
'test.six': 'lorem ipsum'
}
}
};
How do I replace all of the . in the keys sanitizing the object so as to insert it into a mongodb, is there a santize method I can use?