in reply to A Hash is a Hash (of course, of course)
Please consider something like SQLite, which is a single-file easy-to-use database in ONE module. This will separate the data from your program, making it a lot more scalable, and easier to maintain (besides solving your current querying problems).
Yes - there will be a learning curve, but, believe me, you are header in that direction anyway.
If your organization already uses a database technology, you may prefer using that over SQLite.
By guaranteeing freedom of expression, the First Amendment also guarntees offense.