indexable JSON datatype in MySQL/MariaDB
You can do this in MySql 5.7. What you are looking for is adding an index over Generated Columns. You can find an example here:
http://mysqlserverteam.com/inline-json-path-expressions-in-mysql-5-7/