FWIW and insofar as I can recollect, JSON was supported by Postgres before Mongo was a thing, and Mongo was built based on Postgres.
I don't see how Mongo was built based on Postgres, either?
I might be misremembering, though. And there's a possibility that what I read then was inaccurate.
The relevant data structures and indexing mechanisms (hstore, tsvector, gin, gist) were all available -- if only experimentally -- before Mongo launched.