-
Notifications
You must be signed in to change notification settings - Fork 198
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Possible to allow key's with '.'s in them? #96
Comments
@sorahn I think a feature would need to be added. But if you can use this package to unflatten as well, then you could just use a different
Using the same delimiter when unflattening you would get your original structure. If you have |
@rgraffbrd Hmm, that might work. I'd have to think through it. We feed the flattened data into formControlNames (angular), then use lodash for updates ( |
@sorahn Not up on my Angular, but are you essentially saying that you set a form control's name to the full path and then, using lodash, you patch the original data/object structure from a flattened object with the changes? |
Yes that's pretty close. We flatten the object. and use the path as the form name for angular to manage. so roughly
elsewhere, we are also using |
I'm looking for a way to preserve keys that have
.
s in to use the same syntax as lodash's set/get.Ideally something like this:
The problem I've found with using the
transformKey
option is they still get the.
joining them.I have this:
But the output looks like this. (extra
.
aftersome
)I've worked around the issue for now by looping through the flattend data and doing a string replace on
.[
with[
.The text was updated successfully, but these errors were encountered: