Question:I don’t really know how to explain my problem so sorry for the title.
originalPosarray by using
newDataarray like this :
Answer:You can rearrange by finding the position of every element of
originalDataand with that respective position you can push the element from
newDatainto the result array.
Assuming there is no duplicate data within all three arrays
If you have better answer, please add a comment about this, thank you!