JasonEWNL
2022-10-18 14:06:06 +08:00
虽然缺少样例数据不过后俩基本思路如下,必要时可构造相应类型。(缩进用下划线表示以便查看。)
```java
List<OrderAttribute> orderAttributeList = orderData.get("order_lineitem_components")
____.filter(
________order -> order.get("material_type_id").toString()
____________.equals(materialType.get("ART").get("id").toString())
____)
____.map(order -> order.get("custom_attributes"));
boolean isEmpty = orderAttributeList.isEmpty();
List<String> artTypeList = orderAttributeList
____.map(orderAttribute -> orderAttribute.get("art_type").toString());
boolean containsImage = artTypeList.contains("image_upload");
```