Forum
Identifying a Collection Item in code
Hi,
Can anyone tell me if there is an existing method or a approach they've used, to identify a Collection Item using one of the Item's fields?
For example, if I had a Collection of sale items that each had a Ref, Name and Price, I'd like to get the item with the Name "Soap" or the reference "S0001".
Any ideas?
You'd use a filter for that.
See the examples here: https://docs.grabaperch.com/functions/collections/perch-collection/
Cool, thanks!