Here is an API to test with/without the proposed change.
Before change, returns an empty array.
After change, returns the filtered array.
<?php
require('../../dmxConnectLib/dmxConnect.php');
$app = new \lib\App();
$app->define(<<<'JSON'
[
{
"name": "list",
"module": "arraylist",
"action": "create",
"options": {
"schema": [
{
"type": "text",
"name": "name"
},
{
"type": "boolean",
"name": "status"
}
]
},
"meta": [
{
"type": "text",
"name": "name"
},
{
"type": "boolean",
"name": "status"
}
],
"outputType": "array"
},
{
"name": "",
"module": "arraylist",
"action": "add",
"options": {
"ref": "list",
"value": {
"name": "active",
"status": 1
}
}
},
{
"name": "",
"module": "arraylist",
"action": "add",
"options": {
"ref": "list",
"value": {
"name": "disabled",
"status": 1
}
}
},
{
"name": "",
"module": "arraylist",
"action": "add",
"options": {
"ref": "list",
"value": {
"name": "hidden",
"status": null
}
}
},
{
"name": "list",
"module": "arraylist",
"action": "value",
"options": {
"ref": "list"
},
"output": true,
"meta": [
{
"name": "name",
"type": "text"
},
{
"name": "status",
"type": "boolean"
}
],
"outputType": "array"
},
{
"name": "foo",
"module": "core",
"action": "setvalue",
"options": {
"value": "{{list.where('status', '==', null)}}"
},
"meta": [
{
"name": "name",
"type": "text"
},
{
"name": "status",
"type": "boolean"
}
],
"outputType": "array",
"output": true
}
]
JSON
);
?>