Run Code  | API  | Code Wall  | Misc  | Feedback  | Login  | Theme  | Privacy  | Patreon 

Postgres recursive query with row_to_json, David's first attempt

Language: Layout:
absolute service time: 0,4 sec 
edit mode |  history
   jsonb_pretty
1 [ { "id": 3, "name": "2", "children": [ ], "parent_id": null, "customer_id": 3, "description": "" }, { "id": 4, "name": "3", "children": [ { "id": 5, "name": "3.1", "children": [ ], "parent_id": 4, "customer_id": 5, "description": "" } ], "parent_id": null, "customer_id": 4, "description": "" }, { "id": 1, "name": "1", "children": [ { "id": 2, "name": "1.1", "children": [ { "id": 6, "name": "1.1.1", "children": [ ], "parent_id": 2, "customer_id": 6, "description": "" } ], "parent_id": 1, "customer_id": 2, "description": "" } ], "parent_id": null, "customer_id": 1, "description": "" } ]

    
                
λ
.NET NoSQL database for rapid development