Skip to content

Task 8 #1853

Answered by kushal34712
kushal34712 asked this question in Q&A
Task 8 #1853
Oct 22, 2024 · 2 comments · 1 reply
Discussion options

You must be logged in to vote

i was finding this code

// Parse the JSON response
var responseJson = pm.response.json();

// Get the actorName from the response body
var actorName = responseJson.data.actorName;

// Set the actorName as a collection variable
pm.collectionVariables.set("favoriteActor", actorName);

// Log the actorName to the console for verification
console.log("favoriteActor set to: " + actorName);

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@kushal34712
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by MastanSayyad
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants