i have a list of array and a single array. I want to compare this 2 array like this if productID and attributesData match return something my list structure given below
List1:
{
"unitPrice": "800.0",
"productTypeTitle": "TYPE",
"productId": "470",
"attributesData": [
{
"attributeName": "COLOR",
"attributeData": "BLUE"
},
{
"attributeName": "SIZE",
"attributeData": "36"
},
{..}
],
"count": 2,
"shopid": "53",
"sessionid": "1643195257593",
...
},
{
},...
]
List2:
{
"unitPrice": "800.0",
"productTypeTitle": "TYPE",
"productId": "470",
"attributesData": [
{
"attributeName": "SIZE",
"attributeData": "42"
},
{
"attributeName": "COLOR",
"attributeData": "Orange"
},{...}
]
...
}
Here productId is same but attributesData not same how can I find out that.I am able check if productId is same or not but unable to compare attributesData .How I can solve this problem of efficient way