Level 75
Did you lookup in documentation how to query json fields.
Also:
https://dev.mysql.com/doc/refman/8.0/en/json-search-functions.html
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
This is my complex collection
"education" => "[{"key":1,"degree":"Illo reprehenderit h","field_of_study":"Obcaecati dolores si","institution_name":"Bradley Potter","completed":false,"from":"June 2020","actual_from":"2020-06-08","to":"June 2020","actual_to":"2020-06-12","description":"Assumenda culpa unde"}]"
"contact" => null
"experience" => "[{"key":1,"designation":"Expedita impedit ip","company_name":"Maxwell and Carver Co","industry":[{"id":2,"name":"3Em4SYAE15"},{"id":3,"name":"QxEgBnqyMt"}],"function":[{"id":2,"name":"Mmz2kZ7sPz"},{"id":4,"name":"j4euusSmaj"}],"sub_function":[{"id":2,"name":"oQHuzrC6Fb"},{"id":5,"name":"QBzunPex20"}],"employment_type":"full-time","current":false,"from":"September 2022","actual_from":null,"to":"September 2022","actual_to":null,"responsibility":"Explicabo Asperiore","country":{"id":19,"name":"Bangladesh"},"city":"Quia aliqua Ex esse","child":[]}]"
how to search experience key my logic is not working
return Model::where('experience->key', 1)->get();
Please or to participate in this conversation.