public
Created

Replace question ids with answer ids

  • Download Gist
gistfile1.js
JavaScript
1 2 3 4 5 6 7 8 9 10 11 12 13
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;
}

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.