create a database from two arrays. One array is a user array, you need to find in the second all objects that belong to a specific user from the first array

When asking your question, please include:

:footprints: The steps you have taken
:camera_flash: Relevant screenshots
:link: Any links you have
[ Code { "and": "JSON", "in" : "code block"} ]
:x: Exclude Personal Information.

I have two arrays. An array of users and an array of user notes. An array of notes contains the id of the note and the id of the user it belongs to, as well as the content. It is necessary to find the relevant user notes and make a Database by type: user ID and the corresponding array of id of his notes. I show screenshots with a visual explanation. First screen is the incoming data and second is the desired result Help please. Thank you

It’s funny. I just did that over here.