Gigzolo/dataobject-parser — pull request #1 by DavidTPate (2014-06-23 20:53:25+00:00)
Title: Untransposing Object With Hyphen as Property Doesn't Work Correctly

When using the library to untranspose an object which has a hyphen (or similar character) in the property name it is not correctly untransposed into a structured object.

For example, given an object like:
``` javascript
location: {
'address-two': 'Grandma Road'
}
```

It is properly transposed to:
``` javascript
{
'location.address-two': 'Grandma Road'
}
```

But, when attempting to untranspose it the following is the result:
``` javascript
location: {
address: {
two : 'Grandma Road'
}
}
```

I took a look at how this is being handled and it looks like this result is being caused by the Regular Expression that is used to untranspose. My initial suggestion would be to handle this by having the following when transposing, for the example above:
``` javascript
{
'location["address-two"]: 'Grandma Road'
}
```

But from looking through the rest of the library this looks like it would cause a conflict since instead of being treated as a property it would be treated as an array. Based on that requiring a lot of refactoring I just modified the regular expression to target hyphens so that they are properly parsed as part of the property name, not a child object.