I am developing the Spectra Analytics module on drupal.org, and one of the interesting new features in Drupal 8 is the ability to create "map" fields in the database. These fields are simply serialized data, such that you can save an associated array to the field, and Drupal will automatically serialize/unserialize the data.
For the main purpose of the module (querying by category and printing large amounts of custom data), this has been great. However, I am looking at applications where it might be useful to query the map data.
How can I do that?
Additional note:
I am reading up on MongoDB and other cases where this kind of data would be stored & query-able as a JSON array, so it seems like this is possible. One example application would be a list of alerts, and in a map field we have an associative array of data about the alert, such as "message," "severity," and "dismissed," and in this case we are looking for a particular "dismissed" property. The alternative solution is to use Field API fields, i.e. create an extra table to hold data that is queried in the traditional way.