Are you submitting a bug report or a feature request?
bug report
What is the current behavior?
toPath splits 'foo["bar.baz"]' to ['foo', '"bar', 'baz"']
It's impossible to use a nested object key with . in the name and messy to use a nested object key that's not a valid JS identifier. 'foo["bar.baz"]' is an idiomatic JS pathstring supported by libs like lodash.get:
_.get({foo: {"bar.baz": 3}}, 'foo["bar.baz"]') // 3
I have to use an arbitrary, user-entered string value as part of the nested object key, so I need final-form to support quoting and escaping properly here.
My field name that was working fine in redux-form and is now broken with final-form is "Channels["{\"type\":\"MetadataItem\",\"connectionId\":14,\"direction\":\"FROM_GATEWAY\",\"tag\":\"mqttChannel1\"}"].internalTag".
mqttChannel1 is the user-entered value, and I'm using JSON.stringify to safely escape the object that forms this key.
What is the expected behavior?
toPath splits 'foo["bar.baz"]' to ['foo', 'bar.baz']
What's your environment?
not relevant
Are you submitting a bug report or a feature request?
bug report
What is the current behavior?
toPathsplits'foo["bar.baz"]'to['foo', '"bar', 'baz"']It's impossible to use a nested object key with
.in the name and messy to use a nested object key that's not a valid JS identifier.'foo["bar.baz"]'is an idiomatic JS pathstring supported by libs likelodash.get:I have to use an arbitrary, user-entered string value as part of the nested object key, so I need final-form to support quoting and escaping properly here.
My field name that was working fine in
redux-formand is now broken withfinal-formis"Channels["{\"type\":\"MetadataItem\",\"connectionId\":14,\"direction\":\"FROM_GATEWAY\",\"tag\":\"mqttChannel1\"}"].internalTag".mqttChannel1is the user-entered value, and I'm usingJSON.stringifyto safely escape the object that forms this key.What is the expected behavior?
toPathsplits'foo["bar.baz"]'to['foo', 'bar.baz']What's your environment?
not relevant