Both should also work with "internal" arrays if you've a nested format -- in both cases you'd be pulling the "internal" array into Local_Array, manipulating it, then replacing the original in the blob.
"MVC" Ugh, shiver. Don't remind me of my professional development days.
Yes, I do prefer using JS/JXA. But I'm willing to bet that doing it in KM actions, when it's simple enough, is faster (execution-wise). Strike that - I'm not willing to bet, because that's like throwing the gauntlet down, and we've both got better things to do with out time, right? ;p
Fortunately, I found a better way to do what I wanted to do, so I don't even need this now. But it's good to know how to do it, anyway.
Especially for those of us who might want to use JSON for passing data around our macros but get hives as soon as they see scripts starting with return (() => {...
And while I certainly wouldn't recommend the Search and Replace route it's a handy reminder that this is just text. S'n'R may be the hammer in the JSON manipulation toolbox, and it's better to use the right screwdriver if you can -- but sometimes you just need to hit things
Personally, I think text manipulation is underutilized. Case in point:
I need to put a graphic image into a KM action. I have no idea how to do that, using a JXA Plist object. But I can manipulate the XML for the action, and stick a base64 encoded image into the XML. Problem solved.
(I'm assuming this works. If not, I'll let you know later today.)
(And this is assuming that someone of virtually inexhaustible knowledge doesn't show me how to do it using Obj-C/JXA. Hint, hint, @ComplexPoint.)