I have a multiple list created as
[['Mappings_1:', 'AMA111:AMA112,EM5', 'EM3,EM4',
'EM1,EM2'],
['Mappings_2:', 'AMA111:AMA112,EM5', 'EM3,EM4'],
['Mappings_3:', 'AMA111:AMA112,EM5', 'EM3,EM4',
'EM1,EM2', 'FPA1,FPA1', 'FPA3:FPA4,AMA113']]
I have one selection parameter that can hold a value as 'Mappings_1' or 'Mappings_2' or 'Mappings_3',
If value is 'Mappings_1' then I want to separate the ['Mappings_1:', 'AMA111:AMA112,EM5', 'EM3,EM4', 'EM1,EM2'] in a separate list by assign Id as shown below
valid_map = [{'Id': '1', 'mapping': 'AMA111:AMA112,EM5'},
{'Id': '2', 'mapping': 'EM3,EM4'},
{'Id': '3', 'mapping': 'EM1,EM2'}]
Based on selected parameter, I need to separate the particular list by assign channel id.
Please share some idea