Closed jshlbrd closed 1 year ago
Some data sources have complex object structures with either deeply nested arrays of objects or multiple layers of arrays of objects. For example:
{ "a": { "b": { "c": [{ "d": "e" }], "h": { "i": 1 } } }, "j": { "k": 1 } }
The processor currently pushes { "d": "e" } to the top of the object like this:
{ "d": "e" }
{ "d": "e", "a": { "b": { "h": { "i": 1 } } }, "j": { "k": 1 } }
This makes it nearly impossible to modify the structure of the object after the processor runs because the content of the array is dynamic. This change adds SetKey support which makes this possible (if the SetKey is "x.y"):
{ "a": { "b": { "h": { "i": 1 } } }, "j": { "k": 1 }, "x": { "y": { "d": "e" } } }
This has some other benefits, like making the expansion of non-object arrays possible.
Refactored and added new unit tests.
Description
Motivation and Context
Some data sources have complex object structures with either deeply nested arrays of objects or multiple layers of arrays of objects. For example:
The processor currently pushes
{ "d": "e" }
to the top of the object like this:This makes it nearly impossible to modify the structure of the object after the processor runs because the content of the array is dynamic. This change adds SetKey support which makes this possible (if the SetKey is "x.y"):
This has some other benefits, like making the expansion of non-object arrays possible.
How Has This Been Tested?
Refactored and added new unit tests.
Types of changes
Checklist: