Skip to content

Instantly share code, notes, and snippets.

@davelnewton
Created September 9, 2020 13:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save davelnewton/ce4cf4c47ddd607302e1fd633b53479a to your computer and use it in GitHub Desktop.
Save davelnewton/ce4cf4c47ddd607302e1fd633b53479a to your computer and use it in GitHub Desktop.
const { details } = resp.Result
const keyMatch = i =>
`InternetGatewayDevice.TraceRouteDiagnostics.RouteHops.${i}.HopErrorCode`
for (let i = 1; i < details.length; i++) {
let resp2 = details.find(x => x.key == keyMatch(i)).value
return resp2
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment