I have two arrays
Array1
{"Colour":"RASPBERRY","Size":"11"}
and a list of products
Array2
[
{
"ProductID": 33043,
"Key": "Colour",
"Value": "RASPBERRY"
},
{
"ProductID": 33043,
"Key": "Size",
"Value": "4"
},
{
"ProductID": 33044,
"Key": "Colour",
"Value": "RASPBERRY"
},
{
"ProductID": 33044,
"Key": "Size",
"Value": "5"
},
{
"ProductID": 33045,
"Key": "Colour",
"Value": "RASPBERRY"
},
{
"ProductID": 33045,
"Key": "Size",
"Value": "6"
},
{
"ProductID": 33046,
"Key": "Colour",
"Value": "RASPBERRY"
},
{
"ProductID": 33046,
"Key": "Size",
"Value": "7"
},
{
"ProductID": 33047,
"Key": "Colour",
"Value": "RASPBERRY"
},
{
"ProductID": 33047,
"Key": "Size",
"Value": "8"
}
]
I have both those arrays, I need to fetch ProductID from Array2 Using the data from Array 1, the list can be thousands long, want to avoid heavy work
I appreciate any help you can provide.
looping through and searching but the data set is very large, so we need to find an alternative way