java split 换行,如何使用换行符/ n分割字符串

Hi.

I am trying to use a logic app for a integration solution. I call a service that returns a record where one field is Street. this field contains text with /n and I need that to be the delimiter to split it into three address field in the service I post to.

I am struggling with how to achieve that. Any suggestion to how to achieve that would be most appreciated.



d6ec79ece6fb2f442defffcc77039541.png

解决方案

Hi,

You can do it like below

1. Initialise a variable of Array type outside for each like below

9048d9a66a1018dc07b7c9dfde30414b.png

2. Set this variable in for each with your value like below.

@split(triggerBody()?['Street'],'/n')

3. then,in your http shape you can initialise you variable array which you used earlier like below

address1:@variables('edw')[0]

address2:@variables('edw')[1]

address3:@variables('edw')[2]

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值