Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/main/java/com/contentstack/sdk/Query.java
Original file line number Diff line number Diff line change
Expand Up @@ -1430,7 +1430,8 @@ public Query includeReferenceContentTypUid() {
public Query whereIn(@NotNull String key, Query queryObject) {
if(isValidKey(key)){
JSONObject inQueryObj = new JSONObject();
inQueryObj.put("$in_query", queryObject.queryValueJSON.toString());
JSONObject queryValue = new JSONObject(queryObject.queryValueJSON.toString());
inQueryObj.put("$in_query", queryValue);
queryValueJSON.put(key, inQueryObj);
} else {
throwException("whereIn", "Invalid key", null);
Expand Down Expand Up @@ -1459,7 +1460,8 @@ public Query whereIn(@NotNull String key, Query queryObject) {
public Query whereNotIn(@NotNull String key, Query queryObject) {
if(isValidKey(key)){
JSONObject inQueryObj = new JSONObject();
inQueryObj.put("$nin_query", queryObject.queryValueJSON.toString());
JSONObject queryValue = new JSONObject(queryObject.queryValueJSON.toString());
inQueryObj.put("$nin_query", queryValue);
queryValueJSON.put(key, inQueryObj);
} else {
throwException("whereNotIn", "Invalid key", null);
Expand Down
Loading