I need to transform json objects with arbitrary keys, and integer values like so
{"a":1, "sql":5} → {"a":{"f":1},"sql":{"f":5}}.
I can't figure out the correct postgres jsonb methods. I've set up this db fiddle to make it easy to interact.
Help is highly appreciated. Thanks in advance.