Hello, watching your code I realized that the logic your implement goes the right way. But, I think you shouldn’t use .join(‘‘) method, instead, do you need to extract in srcKey and srcValues the keys and values respectively. After that,
- For each obj of arrOfObjs check if it has all the keys,
1.1) If true: check if all the key-value pairs match.
1.2) If false: continue for the next obj.
- If all the key-value pairs match in the step 1.1, then push that obj to the result array.
That’s the logic that I implemented, and it worked.