I have an Array that looks like:
array(
0 => array (
"Something" => array(
"id" => 1,
"foo" => "bar"
),
"User" => array( ... )
),
1 => array (
"Something" => array(
"id" => 5,
"foo" => "foobar"
),
"User" => array( ... )
),
2 => array (
"Something" => array(
"id" => 13,
"foo" => "bar"
),
"User" => array( ... )
)
)
I want to extract alle "Something"s where "foo" = "bar" bzt I also want to get the assosiated User as well. So the output should look like this:
array(
0 => array (
"Something" => array(
"id" => 1,
"foo" => "bar"
),
"User" => array( ... )
),
1 => array (
"Something" => array(
"id" => 13,
"foo" => "bar"
),
"User" => array( ... )
)
)
I tried:
{n}.Something[foo=bar]
{n}.Something[foo=bar]..
{n}[Something.foo=bar]
{n}[foo=bar]
{n}.[Something.foo=bar]
{n}.[foo=bar]
What is the right way to extract an array with all its neighbor?