Quantcast
Channel: PostgreSQL output to JSON object/array - Stack Overflow
Browsing latest articles
Browse All 2 View Live

Answer by D-Shih for PostgreSQL output to JSON object/array

You can try to use only one json_build_object in json_agg function. json_build_object explain from the document. Builds a JSON object out of a variadic argument list. By convention, the argument list...

View Article


PostgreSQL output to JSON object/array

I'm running PostgreSQL and are trying to convert this: SELECT car_id AS id, car_model AS model FROM cars into this: [{ "id" : 123, "model" : "Fiat" }, {"id": 124, "model": "BMW"}, ...] I've tried:...

View Article

Browsing latest articles
Browse All 2 View Live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>