I have this code in my VIEW:
SELECT json_object_agg(code,value) FROM table1
It generates this in my postgREST api:
[{"json_object_agg":"{code1: value1, code2: value2, ...}"]
I want to remove the json_object_agg
to make it like this:
[{code1: value1, code2: value2, ...}]
How do I do that?
You can't have empty result set name. I assume this is related to your previous question where you were getting
So if you try to name the column with empty value (closest I can think of from your post requirements), you get the error:
Of course you can mokey hack it with space character, like:
which is ALMOST no name, but I assume you have to modify your "postgREST api" in order to do it properly - ignoring the result set attribute name