Title: Problem with the meta_query
Last modified: August 20, 2016

---

# Problem with the meta_query

 *  [tetedekiwi](https://wordpress.org/support/users/tetedekiwi/)
 * (@tetedekiwi)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/problem-with-the-meta_query/)
 * Hi
 * I’m working on a website that that sells tires for vehicules and i’m at the step
   where i must use custom fields for the client to be at ease. I’m using the meta_query
   for my custom field and everything works fine for normal custom fields. The problem
   is that I have a custom field with data that is stored inside an array and I 
   have problems to make my query for that.
 * With a normal custom field, i’d do something like that:
 * ‘meta_query’ => array(
    array( ‘key’ => ‘size’, ‘value’ => ‘130’, ‘compare’ =
   > ‘=’ ) )
 * But if the data is inside an array, how can I query that?
 * The thing would look like that on my logic, but of course it doesn’t work:
 * ‘meta_query’ => array(
    array( ‘key’ => ‘specifications[“sub_key”]’, ‘value’ 
   => ‘winter’, ‘compare’ => ‘=’ ) )
 * Query like that doesn’t work but that’s exactly how I would like to use the query.
   So is there a way to achieve something like that?
 * Thank you

The topic ‘Problem with the meta_query’ is closed to new replies.

## Tags

 * [array](https://wordpress.org/support/topic-tag/array/)
 * [custom fields](https://wordpress.org/support/topic-tag/custom-fields/)
 * [key](https://wordpress.org/support/topic-tag/key/)
 * [meta_query](https://wordpress.org/support/topic-tag/meta_query/)
 * [question](https://wordpress.org/support/topic-tag/question/)

 * 0 replies
 * 1 participant
 * Last reply from: [tetedekiwi](https://wordpress.org/support/users/tetedekiwi/)
 * Last activity: [14 years, 10 months ago](https://wordpress.org/support/topic/problem-with-the-meta_query/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
