以下格式在正文
中"dateOfBirth":"[
1980,
6,
5
]",
我必须参数化(每次迭代必须更改(使用CSV文件))。
提前致谢
答案 0 :(得分:0)
在我看来,你有两个选择:
dateOfBirthYear,dateOfBirthDay,dateOfBirthMonth
1980,6,5 //1st iteration
1981,10,11 //2nd iteration etc.
...
[
{ //here first iteration starts
"dateOfBirth":
[
1980,
6,
5
],
"someOtherData: "string"
},//here is the end of 1st iteration
{//here second iteration starts
"dateOfBirth":
[
1980,
6,
5
],
"someOtherData: "string"
}//here is the end of 2st iteration
]
(JSON中不允许发表评论)
然后您可以在预请求脚本中使用它:
var dateArray = data.dateOfBirth
但不要忘记这样的语法不起作用:{{data.dateOfBirth[1]}}
(在Url f.e中)