Skip to content

Instantly share code, notes, and snippets.

@randallsquared
Created December 18, 2017 05:42
Show Gist options
  • Save randallsquared/3647866a0ab06c4559f82ce1b568af2e to your computer and use it in GitHub Desktop.
Save randallsquared/3647866a0ab06c4559f82ce1b568af2e to your computer and use it in GitHub Desktop.
Issues with translation
//Once you start converting
{
"uber": {
"data": [
{"name": "givenName", "value": "Will"},
{"name": "givenName", "value": "Tom"}
]
}
}
//to (other fields elided)
{
"givenName": ["Will", "Tom"]
}
//you're going to have trouble with
{
"uber": {
"data": [
{"name": "givenName", "value": "Will"},
{"name": "lastName", "value": "Williams"},
{"name": "givenName", "value": "Tom"},
{"name": "lastName", "value": "Thompson"}
]
}
}
//because now you'll have munged it to (other fields elided)
{
"givenName": ["Will", "Tom"],
"lastName": ["Williams", "Thompson"]
}
//and lost the connection between Will and Williams.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment