Setting the values of a Multifield item

Here’s the example:

protected override void ProcessItem(Item item)
{
	var injectedList = new List<MultiFieldItem>();

	foreach(var attribute in item.NwpItem.Attributes)
	{
		var multiFieldItem = new MultiFieldItem();

		multiFieldItem.Fields.AddOrUpdateValue(NwpBaseProductConstants.NwpGenericLabel, attribute.Name);
		multiFieldItem.Fields.AddOrUpdateValue(NwpBaseProductConstants.NwpGenericValue, attribute.Value);

		injectedList.Add(multiFieldItem);
	}

	item.Variant.Fields.AddOrUpdateValue(NwpBaseProductConstants.NwpGenericProperty, injectedList);
	_variantService.Update(item.Variant);
}