The below post led me to evaluate using jsonpatch for json to json transformation:
The project can be found here:
https://github.com/bruth/jsonpatch-js
I am currently trying to change the name of all elements in an array and am not seeing how this is possible. My current attempt is:
var transformations = [{ op: 'move', from:'/hits/1/_id', path: '/hits/1/pizza'}];
This swaps out the first element but how do I do a "*" card type operation? Something like:
var transformations = [{ op: 'move', from:'/hits/*/_id', path: '/hits/*/pizza'}];
I could see possibly calling the transformation N times for each element but that seems like a hack.