Hi everyone, I had managed to solve most things on my own but that part stumps me and I’d really like to have a deeper understanding because I’m using fCC to review JS and practice. So after checking out other posts about this exercise I get the general gist of it and reading the solution does make sense, but I couldn’t independently arrive at it - this sounds like a bit of a dumb question but how exactly would the function “know” that the argument I’m passing is, for example, an id by just receiving a random number without there being an explicit connection made between these elements beforehand? The function has three parameters that are used to access different levels of the object(s) and somehow it works, but I don’t get how and it’s driving me crazy…
Edit: sorry, forgot to link the exercise, here it is —>
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-javascript/record-collection