Skip to content
Create a gist now

Instantly share code, notes, and snippets.

Replace question ids with answer ids
function getReplies(sourceArray, replyArray){
var output= [];
for (i in sourceArray){
output.push([alltrim(sourceArray[i][0])]);
for (j in replyArray){
if (alltrim(sourceArray[i][0])==replyArray[j][1]) {
output.pop();
output.push([replyArray[j][0]]);
}
}
}
return output;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.