I have a variable with below value, if we see this variable value the words “qualityGateStatus”, “bugs” , “vulnerabilities” and “codeSmells” are repeated multiple times with their corresponding values.
Now i want to get the last instances of these words with their corresponding values. how can i get this done? please help.
thank you matt, with $var1[-1] i am getting the complete last line “@{qualityGateStatus=‘OK’; bugs=3; vulnerabilities=6; codeSmells=7}”, but i want the individual words values from this line. output should be like below:
qualityGateStatus is OK
bugs are 3
vulnerabilities are 6
codeSmells are 7