Parsing a List stored in a Variable

Input:
I've a variable 'sysConfig' that stores list in the following format:

sysConfig=[svc1,nsp1,clus1],[svc2,nsp2,clus2],[svc3,nsp3,clus3],[svc4,nsp4,clus4]

Output:
I'd like to parse the 'sysConfig' and store value in new variables as follows:

service1=svc1
namespace1=nsp1
cluster1=clus1
..
..
service4=svc4
namespace4=nsp4
cluster4=clus4

Thanks much in advance.

Hello @part and welcome to the forum!! :slight_smile:

On our forums we encourage users to add 3 simple things in their question.

  1. Sample of input,
  2. Sample of expected output and
  3. most important point; user's efforts(if possible in form of code) which user has put in order to solve their own problems, so request you to do add the same and let us know then.

Thank you
~ sea

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.