How to filter by json values in mysql

Formit in database stores all form fields in modx_formit_forms table as json like this:
({“name”:“okm an",“uid”:“3”,“email”:"john.doe@fake-emails.com”})

I need to select all forms from the table sumbitted by user with uid = 3

I need some help…

1 Like

Someone will jump in here soon.

I searched for JSON and found this thread which goes off in another direction, but does start out with a simple snippet to get a data array from a JSON file. Maybe it can help

Hi,

Well this is a bit different of what I accomplished with Migx.
Migx parses json to custom manager pages.

You are wanting to retrieve info from a MySQL field containing json and perform a query on a specific json field.

If this is the situation, and depending on your MySQL/mariadb version, please have a look here:

MySQL already has native json parsing functions that will make your life easier.

Cheers

1 Like