1

I have the below two responses, I need to check whether the res1.member.part[0].supportedMembers[*].muid == res2.membersSupported[*].member.muid (order of the elements are not same). Tried out different things but nothing is working out for me. Any help would be greatly appreciated!

* def res1 = {"member":{"muid":"MBR1"},"part":[{"PID":"M123"},{"supportedMembers":[{"muid":"MBR3","status":{"code":"A"}},{"muid":"MBR2","status":{"code":"I"}}]}]}

* def res2 = {"members":[{"member":{"muid":"MBR2","test":[{"EID":"E123"}]}},{"member":{"muid":"MBR3","test":[{"EID":"E123"}]}}]}
JCK
  • 129
  • 3
  • 11

1 Answers1

1

Here you go:

* match res1.part[1].supportedMembers[*].muid contains only $res2.members[*]..muid

Also note that you can use .. to simplify things in some cases.

Peter Thomas
  • 54,465
  • 21
  • 84
  • 248