本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。
RemoveAttributes 活动
removeAttributes
活动从消息中删除属性。例如,给定消息是这样的addAttributes
活动。
{ "device": { "id": "device-123", "coord": [ 47.6, -122.3 ] }, "id": "device-123", "lat": 47.6, "lon": -122.3 }
要对该消息进行标准化以使其仅包含根级别的必需数据,请使用以下内容removeAttributes
活动。
{ "removeAttributes": { "name": "MyRemoveAttributesActivity", "attributes": [ "device" ], "next": "MyDatastoreActivity" } }
这将导致以下消息沿管道流动。
{ "id": "device-123", "lat": 47.6, "lon": -122.3 }