Here are two arrays of objects:
Object 1:
[
{
"id":"30772",
"posimage":"/b/l/blue-shirt_1_1.jpg",
"position":"Position Chest",
"tech":"Embroidery"
},
{
"id":"30772",
"posimage":"/b/l/blue-shirt_1_1.jpg",
"position":"Position Chest",
"tech":"Screenprint Textile"
},
{
"id":"30772",
"posimage":"/b/l/blue-shirt_1_1.jpg",
"position":"Position Arm Left",
"tech":"Embroidery"
},
{
"id":"30772",
"posimage":"/b/l/blue-shirt_1_1.jpg",
"position":"Position Arm Left",
"tech":"Screenprint Textile"
}
]
Object 2:
[
{
"sku":"30772",
"qty":"1"
},
{
"position":"Position Arm Left",
"tech":"Embroidery"
},
{
"position":"Position Chest",
"tech":"Screenprint Textile"
}
]
Object 2:
[
{
"position":"Position Arm Left",
"tech":"Embroidery"
},
{
"position":"Position Chest",
"tech":"Screenprint Textile"
}
]
I am looking to compare the object parameters, specifically position and tech, to obtain a final array with matching positions and objects as shown below
Final output:
[
{
"id":"30772",
"posimage":"/b/l/blue-shirt_1_1.jpg",
"position":"Position Chest",
"tech":"Screenprint Textile"
},
{
"id":"30772",
"posimage":"/b/l/blue-shirt_1_1.jpg",
"position":"Position Arm Left",
"tech":"Embroidery"
}
]