Profile Lookup help needed - failing first two tests

I need your help for this 
function lookUpProfile(name, prop){
// Only change code below this line
var i=0;
while (i < contacts.length) {
    if (contacts[i]["firstName"] === name) {
        var j = 0;
        while  (j < contacts.length) {
        if (contacts[j].hasOwnProperty(prop)) {
            return contacts[j][prop];
          return "No such property"
return "No such contact"
// Only change code above this line

here is the output:
// running tests
"Kristian", "lastName" should return "Vos"
"Sherlock", "likes" should return ["Intriguing Cases", "Violin"]
// tests completed

@Mountaga Please create a new topic for help with a new challenge. I have move this question to a new topic.

Thank you.

you are checking if the name correspond to the name of the current object, but then you are checking if contacts[0] has the property (no check if name correspond), and if it does you are returning contacts[0][prop], or if it doesn’t it checks if the next object has the name…
hint: one loop is enough