I am trying to figure out how to form an array that collects every index of a particular object (in this case a single letter) where it appears in a nested set of arrays. For instance, using the array set below,
boggle_board = [["P", "P", "X", "A"], ["V", "F", "S", "Z"], ["O", "P", "W", "N"], ["D", "H", "L", "E"]] I would expect something like boggle_board.include?("P") to return a nested array of indices [[0,0][0,1],[2,1]]. Any ideas on how to do this?