Toggling by name is easy in this case, because the needed helper method can be reused.
{{selection|json}}
{{fruits|json}}
Toggling by name is not so easy in this case, because the the code is either rather ugly, or a helper method is needed.
{{selection|json}}
{{fruits|fruitSelection:'name'|json}}
{{fruits|filter:{selected:true}|json}}
{{selectedFruits()|json}}
{{fruits|json}}