AnsweredAssumed Answered

Working with JSR step after JSON Path Filter

Question asked by konvictbibhu on Feb 14, 2019
Latest reply on Feb 14, 2019 by Rick.Brown

Will_Truong J_NeSmith Rick.Brown


Hi Team,

In a scenario I have extracted the below by using the filter:

JSON Path : $[*].id

JSON Value : {{ids}}

JSON Length : {{len}}


For a instance:

ids = ["10","20","30"]

len = 3


After this I wanted to rephrase the final result as below in a string exactly as written below:


FinalString = testExec.setStateValue({"id="{{ids[1]}}",This is first" ; "id="{{ids[2]}}",This is second" ; ....});


Can some one please help me with the JSR code i should use for the above scenario.


Thanks and Regards,