Build a pemutation p such that ids1[p] == ids2. See http://www.win-vector.com/blog/2017/09/permutation-theory-in-action/.
unique vector of ids.
unique vector of ids with sort(ids1)==sort(ids2).
p integers such that ids1[p] == ids2
1 2 3 4 5 6
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.