> I think JavaScript would benefit from an in-memory database.
That database would probably look a lot like a JSON object. What are you suggesting, that a global JSON object does not solve?The more structures you have in a given application and the larger those structures become in their schemas the more valuable a uniform storage and retrieval solution becomes.
from cities select state where name='Chicago'
isn't really different from cities.filter(x=>x.name=='Chicago').map(x=>x.state)isn't that just global state, or do you mean you want that to be persistent?