JSON is just as much rooted in math as SQL tables - it is `fix T = FiniteMap String T` plus a few primitive types, while SQL is `Collection (Set [String])` plus a few primitive types.
Of course, SQL has a nice efficiently-implementable algebra of set comprehensions, which may or may not be interesting for your particular use-case.