名单的跑步者
我正在努力使我的跑步者起作用。 在这里,我的方法的原始主体
{
"itemList": [
"{{items}}"
],
"storeType": 7,
"storeNum": [
"{{store}}"
]
}
我想使用一个包含该行的CSV文件,例如此
商店,项目
115,“ 1097456,85591,716027”“
问题是,我不知道如何将我从文件中获得的字符串格式化” 1097456,85591,716027“使我的身体起作用。
我的身体应该看起来就是这样:
{
"itemList": [1097456,855591,716027],
"storeType": 7,
"storeNum": [115]
}
如果我从“ {{items}}}”中删除双引号,我会遇到JSON错误。 我迷路了,开始认为这是不可能的:(
欢迎任何帮助。
谢谢
I'm struggling to make my runner works.
Here the raw body of my method
{
"itemList": [
"{{items}}"
],
"storeType": 7,
"storeNum": [
"{{store}}"
]
}
i want to use a csv file containing line like this
store,items
115,"1097456,855591,716027"
The issue is, i don't know how to format the string i got from the file "1097456,855591,716027" to make my body works.
My body should look's like that:
{
"itemList": [1097456,855591,716027],
"storeType": 7,
"storeNum": [115]
}
If i remove the double quote from "{{ITEMS}}" i got a json error.
I'm lost and start to think this is impossible :(
Any help is welcome.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
步骤1:更改请求主体
步骤2:在预要求选项卡中写代码以将字符串转换为数字列表。
CSV文件:
样本请求主体:
Step 1: Change the request body
Step 2: Write code in Pre-Request tab to convert String to a list of number.
CSV file:
Sample request body: