title: Example filter hook to update item with related field
body: <p>I have 3 collections: 'customers', 'resellers', and 'orders'.
  Customers are related to resellers by a many to one relationship.
  Resellers are related to customers by a one-to-many relationship.
  Orders relate to a customer by a many-to-one relationship.</p>
  <p>I want to automatically set the orders.reseller field based on the chosen customer using the previously configured many-to-one relationship.</p>
  <p>The $payload object only contains 'orders' columns, so I cannot see 'customer.reseller', just 'customer'.</p>
  <p><a href="https://docs.directus.io/extensions/hooks.html#filter-hooks" rel="nofollow noreferrer">https://docs.directus.io/extensions/hooks.html#filter-hooks</a></p>
  <blockquote>
  <p>Dot Notation
  get() and has() method can use dot-notation to access child elements. eg: get('data.email').</p>
  <p>Payload Object
  Payload object is Arrayable which means you can interact with the data as an array $payload['data']['email], but you can't do \Directus\Util\ArrayUtils::get($payload, 'data.email').</p>
  </blockquote>
  <p>When trying to use <code>\Directus\Util\ArrayUtils::get()</code> I don't get any results returned but <code>$payload-&gt;get()</code> works as expected.  In my example below, I am just setting the returned array to a text field ('out') in the order item for testing.</p>
  <pre><code>'filters' =&gt; [
                  'item.create.orders:before' =&gt; function (\Directus\Hook\Payload $payload) {
                      $data = $payload-&gt;getData();
                      //$data = $payload-&gt;get('customer');
                      //$data = \Directus\Util\ArrayUtils::get($payload,'customer');
                      $out = json_encode($data);
                      $payload-&gt;set('out',$out);
                      return $payload;
                  }
  </code></pre>
  <p>I expect the get function in ArrayUtils to allow me to interact with it as an array and retrieve the 'reseller' column in from the 'customers' table based on the selected 'customer'.</p>
  <p>The Payload Object is only returning an array like: {&quot;order_number&quot;:&quot;1234&quot;,&quot;customer&quot;:&quot;15&quot;}</p>
  <p>'customer' field should match an 'id' (row) from 'customers' table which I want to see the 'reseller' column value for.</p>