Instead of using arr[j], which is grabbing the whole sub array at index j, use arr[i][j] which is grabbing the value of index j in sub array i which is what you want.
I’ve edited your post for readability. When you enter a code block into the forum, remember to precede it with a line of three backticks and follow it with a line of three backticks to make easier to read. See this post to find the backtick on your keyboard. The “preformatted text” tool in the editor (</>) will also add backticks around text.