I'm passing an array of arrays from jQuery to Rails through Ajax:
search_array = [arr1, arr2];
In the console, it shows it to me as this is being passed:
search_array => {"0" => ["Trader"], "1" => ["x1"]}
Which is correct.
How do I access the values of each array? I am able to access just arrays of values through normal declaration:
myArrayInRails = params[:searchArray]
and then do normal calls such as:
myVar = myArrayInRails[0]
And get the value, but I can't access deeper in with:
myVar = myArrayInRails[0][0]
It gives me:
Undefined method '[]' for nil:nilClass.