json2json icon indicating copy to clipboard operation
json2json copied to clipboard

Path as an array

Open fabianTMC opened this issue 8 years ago • 0 comments

I have an object similar to this:

{
    "1": [
        {"a": "valueA", "b": "valueB"},
        {"a": "valueC", "b": "valueD"},
    ],
    "2": [
        {"a": "valueE", "b": "valueF"},
        {"a": "valueG", "b": "valueH"},
    ]
}

I want to apply a transformation across all arrays of each key in the object in a similar manner. Using path, I can pick up on each key individually and transform as needed but I am having issues applying the same across all other keys in the object.

Is there a way to provide an array of paths like so: path: ["1", "2"]

Or is there another way to do this?

fabianTMC avatar Nov 16 '17 08:11 fabianTMC