- // let topLevel = _find(found[foundKey], {id: fieldKeyArray[1]});
- if (foundKey == fieldKeyArray[1]) {
- results = this.getAbsoluteResults(found[foundKey], pathArray.splice(-i, i));
- return results;
+ if (_isArray(found[foundKey])) {
+ let topLevel = _find(found[foundKey], {id: fieldKeyArray[1]});
+ if (topLevel) {
+ results = this.getAbsoluteResults(topLevel, pathArray.splice(-i, i));
+ return results;
+ }
+ } else {
+ if (foundKey == fieldKeyArray[1]) {
+ results = this.getAbsoluteResults(found[foundKey], pathArray.splice(-i, i));
+ return results;
+ }