I have a nested array of values that look like this in RoboMongo;
Or this might be slightly clearer;
Is there a way of being able to (in one query) search through all the key/value pairs with a regex? The script will not know how many customField key/value pairs there are!
So far I have in PHP;
['poco.customFields.0.value' => ['$regex' => '.*'.$query.'.*', '$options' => 'i']],
Which is working on the first key/value pair nicely.. But not the others and I don't know how to do that without either doing two queries or just guessing that there will be no more than, say, 100 and just looping through it.