How to update specific FieldCollection item for specific object?

I have to update my FieldCollection item for object.
Like I have
Categories(Class) : -> FilterData
FilterData (FieldCollection) : (name , price )

I have to Update Price for specific name .
any idea ??

i am using this way
$newObject = Quote::getById($id);
$items = $newObject->getQuotedata(); //field collection
$item = $items->get($index); // get index wise data

and then u can update $item using setters but
there is no option using getByFieldName

iterate over it and change it then

1 Like