File tree Expand file tree Collapse file tree 1 file changed +19
-1
lines changed
Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -179,7 +179,25 @@ export class Query extends BaseQuery {
179179 * @returns {Query }
180180 */
181181 containedIn ( key : string , value : ( string | number | boolean ) [ ] ) : Query {
182- this . _queryParams [ key ] = value ;
182+ this . _queryParams [ key ] = { '$in' : value } ;
183+ return this ;
184+ }
185+
186+ /**
187+ * @method containedIn
188+ * @memberof Query
189+ * @description Returns the raw (JSON) query based on the filters applied on Query object.
190+ * @example
191+ * import contentstack from '@contentstack/delivery-sdk'
192+ *
193+ * const stack = contentstack.Stack({ apiKey: "apiKey", deliveryToken: "deliveryToken", environment: "environment" });
194+ * const query = stack.contentType("contentTypeUid").Query;
195+ * const result = containedIn('fieldUid', ['value1', 'value2']).find()
196+ *
197+ * @returns {Query }
198+ */
199+ NotContainedIn ( key : string , value : ( string | number | boolean ) [ ] ) : Query {
200+ this . _queryParams [ key ] = { '$nin' : value } ;
183201 return this ;
184202 }
185203}
You can’t perform that action at this time.
0 commit comments