I have a list of objects, that among other attributes have an attribute named "id"
listA = [{"id":"5","age":"44"},{"id":"8","age":"34"},{"id":"15","age":"84"}]
I have a list of strings such as :
listB = ["9","1","7","5","10","15","20"]
I wish to extract into a third list, all object ids from listA that have an id value in listB
the expected result would be :
listResult = ["5","15"]
How can I do this without using loops?