Get Index String Javascript Substring