afncas;klcnam; acfm;ascm aklbncfl;aknc
Where do you handle the case that the first name matches but the property does not exist? I suspect that your else if does not do what you want it to do. You return return “No such property” the first time you find a contact without that property.
I dont understand how Bob, number is working and Bob, potato not?
Your’ else if’ checks only if the property exists, regardless of if the name matches. This means that you “No such property” the first timeyou find a contact without the property when instead you should have returned “No such contract”.