How does one parse an object with points (.) included in the keys to an multi leveled object?
Example:
{
"data.firstName": "John",
"data.lastName": "Doe",
"data.email": "example@example.org"
}
Expected result:
{
data: {
firstName: "John",
lastName: "Doe",
email: "example@example.org"
}
}
PS: You can find collections like this in MongoDB's find query, but I couldn't find how the do it, hence the question.