79292898

Date: 2024-12-19 01:30:20
Score: 1
Natty:
Report link

I have found a stupid workaround in case we generated the set from a mapDiff. We take the keys of the 2 maps as 2 lists and remove one from the other. In my case I had only 1 key difference by design:

let newKey = request.resource.data.keys().removeAll(resource.data.keys())[0];

this is the key that would be in the set:

request.resource.data.diff(resource.data).addedKeys();

Now you can access the value of the map with:

request.resource.data[newKey]

hoping that the order of the lists is the same / removeAll removes all the values regardless of the position.

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: catta