From 741f869140eea8257675ff8c161aee25f7871895 Mon Sep 17 00:00:00 2001 From: Henrik Malmberg Date: Tue, 31 Oct 2017 11:34:25 +0100 Subject: [PATCH] Allows to use dot-notation to match against a complex structure when using matchesKeyInQuery --- src/RestQuery.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/RestQuery.js b/src/RestQuery.js index 8ddda22c..b1ffb3a3 100644 --- a/src/RestQuery.js +++ b/src/RestQuery.js @@ -337,7 +337,7 @@ RestQuery.prototype.replaceNotInQuery = function() { const transformSelect = (selectObject, key ,objects) => { var values = []; for (var result of objects) { - values.push(result[key]); + values.push(key.split('.').reduce((o,i)=>o[i], result)); } delete selectObject['$select']; if (Array.isArray(selectObject['$in'])) {