How to get structure field options from blueprint?

Hi. I’m looking to get the field options directly from my blueprint. There’s a good cookbook article on this. In my case though, I need to get the field from a structure field. Is that possible? I figured something like this might work, but no luck.


Any insight would be appreciated.

Oh… I see that you can dig into the array to extract a field from a structure field.

Sample blueprint…

  type: structure
      type: select 
        option one 
        option two 
        option three 

To get that my_field field you can do something like this…

$field = $page->blueprint()->field('my_structure_field');
$field_options = $field['fields']['my_field']['options'];