I have yet another strange request.
I have a query that runs on a LocId
and returns the below result.
LocId = 123
[
{
"Descriptions": {
"en": "3.625 SS TOS NAC CHS"
},
"EffDtRnge": {
"EndDt": "9999-12-25",
"StrtDt": "2020-03-18"
},
"MtrlUomCdv": "017",
"MtrlUomId": "10378500"
},
{
"Descriptions": {
"en": "3.625 SS TOS NAC CHS"
},
"EffDtRnge": {
"EndDt": "9999-12-25",
"StrtDt": "2020-03-18"
},
"MtrlUomCdv": "004",
"MtrlUomId": "10378501"
}
]
We need to run this query on 5 such LocIds
and return a result that is an intersect of all the responses (not Distinct but an intersect). I am looking at ARRAY_INTERSECT but it does not seem to work if the array is an array of objects rather than singular items like a string.
Any ideas on how I can get an intersect?
LocId = 567
[
{
"Descriptions": {
"en": "3.625 SS TOS NAC CHS"
},
"EffDtRnge": {
"EndDt": "9999-12-25",
"StrtDt": "2020-03-18"
},
"MtrlUomCdv": "017",
"MtrlUomId": "10378500"
}
]
Using the above 2 object arrays, we want the output to be as below. I may be asking for too much but … it is what it is…
{
"Descriptions": {
"en": "3.625 SS TOS NAC CHS"
},
"EffDtRnge": {
"EndDt": "9999-12-25",
"StrtDt": "2020-03-18"
},
"MtrlUomCdv": "017",
"MtrlUomId": "10378500"
}