Multiselect -> save stucture object

Hi all,

            label: Items
            type: multiselect
              type: query
              query: site.find('items').items.toStructure
              text: "{{ }}"
              value: "{{ structureItem }}"

the saved result in the content file is: Items: 0, 1

is it possible to save the whole structureItem as json or how to get those entries from the original structure field?
like: ->whereIn [0,1]


You would usually use something as value that is unique, so that you can find the correct item again afterwards. The number is not a good idea.

do you have a code example how to get all structure items with given names?

$filteredItems = $itemsStructure->filter(function ($item) use ($namesArray) {
        return in_array($item->name()->value(), $namesArray);

got it.