I want to manipulate data of feeds by hook_feeds_presave.
They are given like this:

    FeedsSource Object
    (
     ...       
        [fetcher_result:protected] => FeedsWSClientFetcherResult Object
            (
                [data:protected] => stdClass Object
                    (
                        [GetMatchdataByGroupLeagueSaisonResult] => stdClass Object
                            (
                                [Matchdata] => Array
                                    (
                                        [0] => stdClass Object
                                            (
                                                [matchID] => 23725

So I tried it like this:
$source->fetcher_result['data']['GetMatchdataByGroupLeagueSaisonResult']['Matchdata']['0']['nameTeam1']

But that's wrong.

So how can I get this data from result I want to manipulate???

THX in advance,

maen

Comments

gaurav.goyal’s picture

feeds_hook_presave has a argument $entity, which holds the data for the entity which is imported, you can change the values in $entity.