Modify values that are received via Feeds_ex I've setup Feeds_ex module using JSONPath. One of the value I import is language code and it has next format: [language-country], i.e. [en-US] or [en-UK].

Right now I do import full value 'en-US', however I need to get only 'en' and get ridd of '-US'.

What is the good/best practice to modify value that I receive from Feed?

Thanks.
Try hook_feeds_presave().

Just explore $entity object. You will get some idea.

Below is a example code.

$entity-&gt;lang_country[LANGUAGE_NONE][0]['value'] = 'en'; 
// After split [language-country] store your lang here.


Update:
Also check feeds_tamper