Reverse key-value pairs

JSON pattern

This pattern reverses key-value pairs when the value is a string.

Matches a key-value pair

BEFORE
{ "foo": 5, "bar": "buz" }
AFTER
{ "foo": 5, "buz": "bar" }