I have one table (TBL1), I want to generate another table with unique items from TBL1. Currently, I can do it with elisp as below but I think it's too complicate.
#+NAME: TBL1
| Item | Amount |
|------+--------|
| A | 100 |
| B | 20 |
| A | 120 |
| C | 40 |
| B | 50 |
| A | 20 |
| C | 16 |
|------+--------|
#+BEGIN_SRC elisp :var x=TBL1[1:-1] :results output raw :exports both
(let (y)
(dolist (line x)
(setq y (append y (list (car line)))))
(setq y (delete-dups y))
(dolist (elem y)
(princ (format "|%s|\n" elem))))
#+END_SRC
#+RESULTS:
| A |
| B |
| C |
I can find a similar unique API from the document.what's the best way to do that?