By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
✓
✓
✓
✓
✓
✓
✓
✓
| id | name | clothing |
|---|---|---|
| 1 | John | [{"type":"pant","id":3},{"type":"shirt","id":3},{"type":"shirt","id":4},{"type":"shoe","id":5}] |
| 2 | Mary | [{"type":"pant","id":2},{"type":"shirt","id":3},{"type":"shoe","id":2}] |
| 3 | Jane | [{"type":"shirt","id":1}] |