I have a list of dictionaries that I get back from a web service call.
listA = [{'name':'foo', 'val':'x'},
{'name':'bar', 'val':'1'},
{'name':'alice','val':'2'}]
I need to compare results from the previous call to the service and pull out changes. so on next call I may get:
listB = [{'name':'foo', 'val':'y'},
{'name':'bar', 'val':'1'},
{'name':'eve','val':'z'}]
The ordering is not guaranteed and nor is the length of list. names won't change. The actual data has several more keys but I'm only concerned with 'val'.
Trying to find a way to get back a list of the names that have had their values change between calls only for the names that are in both lists.
changed = ['foo'] # or [{'name':'foo'}]
Thanks.