---
schema_version: "1"
id: 21ddd1d0d31fb0fd76fa521f8de93ba8784b9b5bbb2aac6c4ead4b7f0d3da7db
title: getItemsByParamArray(ArrayOfParams, ArrayOfSortCriteria)
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/ind/264-0-0/cg_modeler_listobject_getitems_param_array.md
canonical_url: https://help.salesforce.com/s/articleView?id=ind.cg_modeler_listobject_getitems_param_array.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 76276766939ef4428ef4797bc19a81b6b8ed970a3163944774a2db87c5e50c8e
description: Returns an array of items that can be iterated.
products:
  - Consumer Goods
release: "264"
---
# getItemsByParamArray(ArrayOfParams, ArrayOfSortCriteria)

Returns an array of items that can be iterated.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: Lightning Experience in <strong>Professional</strong>, <strong>Unlimited</strong>, and <strong>Enterprise</strong> Editions that have Consumer Goods Cloud enabled.</td></tr></tbody></table>

## Parameters

- ArrayOfParams: An array of JSON structures that indicate the simple properties to be selected and the operator. For example: `{ SimpleProperty1 : Value1, "op" :Operator },{ SimpleProperty12: Value2, "op" : Operator }]`
    
    Operator is optional and can be:
    
    - EQ: equal
    - GT: Greater than
    - LT: Lower than
    - GE: Greater or equal
    - LE: Lower or equal
    - NE: Not equal
    
    If no operator is entered, the default—equal—is used.
- ArrayOfSortCriteria: An array of JSON structures that indicate the sort criteria. For example: `{SimplePropertyN : SortDirection}]`. The sort direction can be:
    - ASC: Ascendent
    - DESC: DescendentThe sort array is optional. You can use simple properties other than the ones in the parameters array to sort the outcome.

## Returns

An array of items that can be iterated.

![Example](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ind-consumer_goods_retail_vscode_modeler-264-0-0-production-enus/87cab158-9245-45b0-9080-f17a57d69ec9/images/icon_example.png)

Example

```
Var list = SomeListObjectofTypeLoCustomer
var ParamsArray=[{ "subValidFrom": "2011-12-20 00:00:00", "op" : "EQ" },{ "countryState": "GA", "op" : "EQ" }];
var SortArray=[{"classOfTrade" : "ASC"}];
list.getItemsByParamArray(ParamsArray,SortArray);
```