I have an object array that looks something like this:
let products = [
    {
      "id": 7,
      "name": "product 1",
      "description": "description product 1",
      "images": [
        {
          "id": 1,
          "path": "image1-product1.jpeg",
        },
        {
          "id": 2,
          "path": "image2-product1.jpeg",
        }
      ]
     },
     {
      "id": 20,
      "name": "product 2",
      "description": "description product 2",
      "images": [
        {
          "id": 3,
          "path": "image1-product2.jpeg",
        },
        {
          "id": 4,
          "path": "image2-product2.jpeg",
        }
      ]
     }
  ]
Each product has an image array, I need to compare this image arrangement, with one that I will receive as a parameter and that will look exactly like one of them, to know which product it belongs to and return that product. for example if I receive this array:
[
  {
    "id": 3,
    "path": "image1-product2.jpeg",
  },
  {
    "id": 4,
    "path": "image2-product2.jpeg",
  }
]
equals the images array of product 2, so how can I compare these and return that product?