-
Notifications
You must be signed in to change notification settings - Fork 6
Closed
event-engine/php-postgres-document-store
#4Description
Given a document inside the document store with the following content:
{
"state" : {
"key1" : "value1",
"key2" : [{
"subkey" : "value 1"
}, {
"subkey" : "value 2"
}],
"key3" : "value3"
}
}How can I retrieve that document from the document store using value 2 for subkey inside key2?
For key1 and key3 i'd use the following code:
$filter = new EqFilter('state.key1', 'value1');
$filter = new EqFilter('state.key3', 'value3');But how would I go for value 2?
I tried the following to no avail:
$filter = new EqFilter('state.key2.subkey', 'value 1');
$filter = new EqFilter('state.key2.[].subkey', 'value 1');What am I missing? Do I by chance need to use the ArrayFilter instead?
Metadata
Metadata
Assignees
Labels
No labels