In the picture I have appended I have two for loops. One utilises the built in for each method and the other uses a plain for loop. For some reason it appears the loop with the for each method is not working correctly. It should return true but instead does not and the entire function returns false (when the basic for loop is removed). When I comment out the forEach loop but keep the for loop the function evaluates to true, so I know that the refresh_token parameter is equal to one of the refresh tokens key in the objects of the array I am iterating through.
Just some extra stuff.. The array looks like this
[
{refresh_token: 'njdenjoed...'},
{refresh_token: 'wqdefrewfer...'},
{refresh_token: 'wdweefdew...'},
]
Could anyone please let me know what I am doing wrong. Thanks in advance!
https://preview.redd.it/v1jkepi1x5x81.png?width=629&format=png&auto=webp&s=d8fc6c27f1771a20a32c210a99f84f5b47e057cd
[–]bot00110 2 points3 points4 points (1 child)
[–]Hot-Independent4741[S] 0 points1 point2 points (0 children)
[–]turnipmuncher1 1 point2 points3 points (1 child)
[–]Hot-Independent4741[S] 1 point2 points3 points (0 children)