Unable to set a global variable in postman from response body(Mostly an Array). Assertion error is thrown
Solution 1:
You're not referencing the response data correctly:
pm.globals.set('sedMemberId', jsonData[0].memberDetails[0].MemberId);
You might need to take a look at how to reference different object items of JSON structures when they contain arrays.
Not sure what data.expectedResult
is but it's not going to be defined unless you use a datafile. Even then, you should be using pm.iterationData.get('key_name')
.