I have 2 arrays:
array1 = [{package_id: 4, is_checked: 1, images: Array(0)}] array2 = [ {package_id: 3, width: "80", length: "120", height: "200", weight: "222", …}, {package_id: 4, width: "210", length: "70", height: "76", weight: "83", …} ] The result I want to get is:
array3 = [{package_id: 4, width: "210", length: "70", height: "76", weight: "83", …}] As you can see I removed the object where the package_id didn't match. How can I achieve this?