我有一个列表,我想按市场名称和商品名称分组,按上市价格:例如["Terra","小麦",1000.0] - "Terra"是市场名称,"小麦"是商品名称,1000.0是价格
def marketCommodityGroup = [
["Merkato", "Wheat", 1000.0],
["Shola", "Wheat", 1875.0],
["Merkato", "Barley", 5000.0],
["Merkato", "Wheat", 1000.0],
["Merkato", "Wheat", 1500.0]
]
Run Code Online (Sandbox Code Playgroud)
我希望输出为:
[
["Merkato": ["Wheat" : [1000.0, 1000.0, 1500.0]]],
["Merkato": ["Barley": [5000.0]]],
["Shola": ["Wheat": [1875.0]]]
]
Run Code Online (Sandbox Code Playgroud) 从 cloudformation 中删除 CDKToolkit 堆栈并尝试使用 \ncdk bootstrap --profile stage-profile 命令重新创建它后会引发错误
\xe2\x8f\xb3 Bootstrapping environment aws://123456/eu-central-1...\nTrusted accounts for deployment: (none)\nTrusted accounts for lookup: (none)\nUsing default execution policy of 'arn:aws:iam::aws:policy/AdministratorAccess'. Pass '--cloudformation-execution-policies' to customize.\nCDKToolkit: creating CloudFormation changeset...\n4:11:35 PM | CREATE_FAILED | AWS::SSM::Parameter | CdkBootstrapVersion\nERROR Parameter Name /cdk-bootstrap/******/version with a different configuration already exists.\n\n\xe2\x9d\x8c Environment aws://123456/eu-central-1 failed bootstrapping: Error: The stack named CDKToolkit failed creation, \nit may need to be manually deleted from the AWS console: ROLLBACK_COMPLETE: ERROR Parameter Name /cdk-bootstrap/******/version with …Run Code Online (Sandbox Code Playgroud)