CacheControl / CacheControl/json-rules-engine
How to handle array of objects?
- Ngôn ngữ chính
- JavaScript
- Star
- 3.1k
- Fork
- 507
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
Usecase: Is there any equipment with type embroidery and setting speed 250?
Fact:
```
const facts = {
equipmentList: [
{ type: 'embroidery', setting: { speed: 250 } },
{ type: 'sewing', setting: { speed: 150 } },
],
substrate: { color: { hexcode: '#FFFFFF' } },
Size: 'S',
};
```
// the following IS NOT working as expected. no matter what 'setting.speed' I give, I am getting true for the condition
```
{
"all": [
{
"fact": "equipmentList",
"path": "$[?(@.type == 'sewing' && @.setting.speed == 250)]",
"operator": "notEqual",
"value": []
},
]
}
```
Does the package support this kind of a usecase?
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Đánh giá
Issue này chưa được đánh giá.