I have these two arrays, the first one is made up of foreign keys that come from the BD and the second one by the detail of one of those foreign keys. How can I go through the 0 position of my first array and search the second for the value of that position and return the determinant:
(6) ["1", "1", "si", "1", "37", "238,835,836"]
0:"1"
1:"1"
2:"si"
3:"1"
4:"37"
5:"238,835,836"
length:6
(4) [{…}, {…}, {…}, {…}]
0:{0: "1", 1: "DATO 1", idDeterminante: "1", detDeterminante: "DATO 1"}
1:{0: "2", 1: "DATO 2", idDeterminante: "2", detDeterminante: "DATO 2"}
2:{0: "3", 1: "DATO 3", idDeterminante: "3", detDeterminante: "DATO 3"}
3:{0: "4", 1: "DATO 4", idDeterminante: "4", detDeterminante: "DATO 4"}
length:4
In my first array I have the value 1 in position 0. I want to look for that value in the different positions of array two and when I find it return the determinant that corresponds to it.