Array Filter¶
The Array filter refers to the values array in any of the baseline request elements that may contain arrays.
The Array filter can be used in the point together with the following filters and parsers:
The elements of this array need to be referred to by using the indexes. The array indexing starts with 0
.
Regular expressions in points
The index in the point can be a regular expression of the Ruby programming language.
The Example of Using the Get Filter with the Array Filter¶
For the
request, the Array filter applied to the id
query string parameter refers to the following array:
Index | Value |
---|---|
0 | 01234 |
1 | 56789 |
-
The
GET_id_ARRAY_0_value
refers to the01234
value that corresponds with the0
index from theid
query string parameter values array addressed by the Array filter. -
The
GET_id_ARRAY_1_value
refers to the56789
value that corresponds with the1
index from theid
query string parameter values array addressed by the Array filter.
The Example of Using the Header Filter with the Array Filter¶
For the
request, the Array filter applied to the X-Identifier
header refers to the following array:
Index | Value |
---|---|
0 | 01234 |
1 | 56789 |
-
The
HEADER_X-Identifier_ARRAY_0_value
refers to the01234
value that corresponds with the0
index from theX-Identifier
header values array addressed by the Array filter. -
The
HEADER_X-Identifier_ARRAY_1_value
refers to the56789
value that corresponds with the1
index from theX-Identifier
header values array addressed by the Array filter.
The Example of Using the Form_urlencoded Parser and the Array Filter¶
For the
request with the
body, the Array filter applied to the id
parameter from the request body in the form-urlencoded format refers to the following array:
Index | Value |
---|---|
0 | 01234 |
1 | 56789 |
-
The
POST_FORM_URLENCODED_id_ARRAY_0_value
refers to the01234
value that corresponds with the0
index from theid
parameter values array addressed by the Array filter. -
The
POST_FORM_URLENCODED_id_ARRAY_1_value
refers to the56789
value that corresponds with the1
index from theid
parameter values array addressed by the Array filter.
The Example of Using the Multipart Parser and the Array Filter¶
For the
POST http://example.com/login/index.php HTTP/1.1
Content-Type: multipart/form-data;boundary="boundary"
--boundary
Content-Disposition: form-data; name="id[]"
01234
--boundary
Content-Disposition: form-data; name="id[]"
56789
request, the Array filter applied to the id
parameter from the request body in the multipart format refers to the following array:
Index | Value |
---|---|
0 | 01234 |
1 | 56789 |
-
The
POST_MULTIPART_id_ARRAY_0_value
refers to the01234
value that corresponds with the0
index from theid
parameter values array addressed by the Array filter. -
The
POST_MULTIPART_id_ARRAY_1_value
refers to the56789
value that corresponds with the1
index from theid
parameter values array addressed by the Array filter.
The Example of Using the Xml_tag Filter and the Array Filter¶
For the
request with the
<?xml version="1.0"?>
<!DOCTYPE foo [<!ENTITY eee SYSTEM "aaaa">]>
<?xml-stylesheet type="text/xsl" href="style.xsl"?>
<!-- first -->
<text>
Sample text.
</text>
<text>
&eee;
</text>
body, the Array filter applied to the text
tag from the request body in the XML format refers to the following array:
Index | Value |
---|---|
0 | Sample text. |
1 | aaaa |
-
The
POST_XML_XML_TAG_text_ARRAY_0_value
point refers to theSample text.
value that corresponds with the0
index from thetext
tag values array addressed by the Array filter. -
The
POST_XML_XML_TAG_text_ARRAY_1_value
point refers to theaaaa
value that corresponds with the1
index from thetext
tag values array addressed by the Array filter.
The Example of Using the Json_obj Filter and the Array Filter¶
For the
request with the
body, the Array filter applied to the rights
JSON object from the request body together with the Json_doc parser and the Json_obj filter refers to the following array:
Index | Value |
---|---|
0 | read |
1 | write |
-
The
POST_JSON_DOC_JSON_OBJ_rights_ARRAY_0_value
point refers to theread
value that corresponds with the0
index from therights
JSON object values array addressed by the Array
filter. -
The
POST_JSON_DOC_JSON_OBJ_rights_ARRAY_1_value
point refers to thewrite
value that corresponds with the1
index from therights
JSON object values array addressed by the Array filter.