Posted to tcl by oldlaptop at Sat Sep 24 16:40:23 GMT 2022view raw

  1. eltclsh > package require sqlite3
  2. 3.36.0
  3. eltclsh > set ret {[{"id": 1, "foo": "spam"}, {"id": 2, "bar": "ham"}, {"id": 3, "baz": "egg"}]}
  4. [{"id": 1, "foo": "spam"}, {"id": 2, "bar": "ham"}, {"id": 3, "baz": "egg"}]
  5. eltclsh > sqlite3 parser :memory:
  6. eltclsh > parser eval { select atom from json_tree(:ret) where atom not null and key <> 'id' }
  7. spam ham egg
  8. eltclsh >