bspckl bspckl - 11 months ago 78
JSON Question

VIM: swap json values within double quotes

I need to swap tag and value in a json file on multiple lines using VIM editor.



needs to be:


I have gotten as far as
(using a temp) for the tag and value, but I need to know how to swap either everything within the 2nd and 4th double quotes or everything before and after the comma.

%norm! f,xdT{f}i,^R"

In above cmd, ^R you press ctrl-v ctrl-r