Last active
August 29, 2015 14:01
-
-
Save loadster/7e6a7d7a918af03dc109 to your computer and use it in GitHub Desktop.
Capture the 3rd user's full name from a JSON response
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// {"users": [ | |
// {"id": 1, "fullName": "Hank Hill"}, | |
// {"id": 2, "fullName": "Peggy Hill"}, | |
// {"id": 3, "fullName": "Bobby Hill"} | |
// ]} | |
function capture(response) { | |
var json = JSON.parse(response.bodyAsString); | |
return json.users[2].fullName; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment