How to iterate multi dimensional array and pipe each sub array to another plugin as input in Migration yml I am migrating CSV data into Nodes and Paragraphs in Drupal 8.
I have field in CSV file which has JSON data, I have written a process plugin to convert JSON data to multi-dimensional array.
I would like to know a way to pass the each sub array to my another custom process plugin. Is there any such process plugin available to pipe sub array from parental array in core migrate or through migrate_plus module.
I am looking for something similar so that it passes only sub array into the final custom process plugin.
  pseudo_field_country_time_zones:
    - # plugin which converts JSON data to multi dimensional array.
      plugin: country_timezones_data_formatter 
      source: timezones
    - # not sure if this is correct plugin to process array.
      plugin: sub_process 
    -
      plugin: country_timezones_paragraphs

You might ask why cant you process the data in the country_timezones_paragraphs process plugin itself. That plugin is being used by other process, so dont want to change it. Other solution for me is to write another process plugin but it will be just code duplication with foreach loop added to country_timezones_paragraphs.
I believe there is already a plugin available either from migrate or migrate_plus module for this scenario , but not able to identify what it is.

$input_data = '[{&quot;zoneName&quot;:&quot;Africa Ceuta&quot;,&quot;gmtOffset&quot;:3600,&quot;gmtOffsetName&quot;:&quot;UTC+01:00&quot;,&quot;abbreviation&quot;:&quot;CET&quot;,&quot;tzName&quot;:&quot;Central European Time&quot;},{&quot;zoneName&quot;:&quot;Atlantic Canary&quot;,&quot;gmtOffset&quot;:0,&quot;gmtOffsetName&quot;:&quot;UTC\u00b100&quot;,&quot;abbreviation&quot;:&quot;WET&quot;,&quot;tzName&quot;:&quot;Western European Time&quot;},{&quot;zoneName&quot;:&quot;Europe Madrid&quot;,&quot;gmtOffset&quot;:3600,&quot;gmtOffsetName&quot;:&quot;UTC+01:00&quot;,&quot;abbreviation&quot;:&quot;CET&quot;,&quot;tzName&quot;:&quot;Central European Time&quot;}]';


Decoded JSON array.

$decoded_array = var_dump(json_decode($input_data, TRUE));

Array
(
    [0] =&gt; Array
        (
            [zoneName] =&gt; Africa Ceuta
            [gmtOffset] =&gt; 3600
            [gmtOffsetName] =&gt; UTC+01:00
            [abbreviation] =&gt; CET
            [tzName] =&gt; Central European Time
        )

    [1] =&gt; Array
        (
            [zoneName] =&gt; Atlantic Canary
            [gmtOffset] =&gt; 0
            [gmtOffsetName] =&gt; UTC±00
            [abbreviation] =&gt; WET
            [tzName] =&gt; Western European Time
        )

    [2] =&gt; Array
        (
            [zoneName] =&gt; Europe Madrid
            [gmtOffset] =&gt; 3600
            [gmtOffsetName] =&gt; UTC+01:00
            [abbreviation] =&gt; CET
            [tzName] =&gt; Central European Time
        )

)
There's no such process plugin in core or migrate_plus. If you can't find what you need in those lists, you'll probably have to write a custom solution. You may want to check out SubProcess process plugin which may be able to work with your decoded array with minimal changes.