-
Notifications
You must be signed in to change notification settings - Fork 73
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
Transform runs multiple times in nested array #77
Comments
I have updated deps of my project and i catch this bug too ( I will try localize problem. |
Problem reveals on @pguijarr, @wankdanker could you check this changes and help us find bug? |
Same issue using "6.2.0" |
I had the same issue using version 6.2.0 |
Same issue on version 6.2.0 - This breaks the show in my project. :-( |
I'm seeing the same issue. My workaround is to define any properties that don't use a transform function first. const map = {
"foo": [
{
key: "y" // Works a s expected
},
{
key: "foo",
transform: function (value: string) {
return value + "_foo";
}
},
{
key: "a" // This will use foo's transform function
},
{
key: "baz",
transform: function (value: string) {
return value + "_baz";
},
}
],
"bar": "x"
};
const src = {
foo: 'blah',
bar: 'something'
};
console.log(objectMapper.merge(src, map)) |
This is quite a serieus problem. Multiple transformations are just not possible without interfering with each other. Is there an outlook on a fix ? That would be awesome ! |
is there any update on this? |
Is there any update on this issue? |
Hello!
I have a use case where I'm trying to transform a key in a deeply nested array + object structure. See example below:
I was expecting an output of:
Instead, I get:
I'm doing some further debugging now, but it appears the
transform()
function gets called multiple times in the array iteration.The text was updated successfully, but these errors were encountered: