Convert Array Values Javascript Substring From Right