Why this jQuery is not working? : Why can't I get the index of `hdjs` inside `jdks`?  `jdks` is a jQuery object with all `id^=name` blocks having errors in them. `hdjs` is a block with an ID starting by "name" which has an error in it.  So why am I getting `-1` when console.logging?

Thanks all!

<!-- begin snippet: js hide: false console: true babel: false -->

<!-- language: lang-js -->

    function $errorObjectFunction() {
            return $("div[id^=office_name]").map(function() {
                if ($(this).find(":first-child").hasClass("error") == true || $(this).find(".field_error").length > 0)    {
                    return $(this)
                }
            });
        }
    var $self = $("#self");
    var jdks = $errorObjectFunction();
    var hdjs = $self.parent().parent().parent();
                                console.log("index: " + jdks.index(hdjs));

<!-- language: lang-html -->

    <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
    <div id="name1">
        <div class="fourteen wide field error">
            <input id="OfficeName1"></input>
            <div class="dropdown"></div>
        </div>
    </div>
    <div id="name2">
        <div class="fourteen wide field">
            <input id="OfficeName1"></input>
            <div class="dropdown field_error"></div>
        </div>
    </div>
    <div id="name3">
        <div class="fourteen wide field error">
            <input id="OfficeName1"></input>
            <div class="dropdown field_error"></div>
        </div>
    </div>
    <div id="name4">
        <div class="fourteen wide field error">
            <input id="OfficeName1"></input>
            <div class="dropdown field_error">
                <input id="self"></input> 
            </div>     
        </div>
    </div>
    <div id="name5">
        <div class="fourteen wide field">
            <input id="OfficeName1"></input>
            <div class="dropdown"></div>     
        </div>
    </div>
    <div id="name6">
        <div class="fourteen wide field error">
            <input id="OfficeName1"></input>
            <div class="dropdown field_error"></div>
        </div>
    </div>

<!-- end snippet -->

