对于我的问题,我的解决方案是将JSON转换为对象,以便我可以仅提取所需的值,而不能提取中的值
{...}。在这里您可以看到我的代码:
var JSON={"itemType":"prod","id":"p2301d","version":"10","tags":[{"itemType":"member","id":"p2301e"},{"itemType":"other","id":"prod10450"}],"multiPrice":null,"prices":null};//Transformation into an object: obj = eval(JSON );//write in the Jmeter variable "itemtype", the content of obj.itemType:prodvars.put("itemtype", obj.itemType);有关更多信息:http :
//www.havecomputerwillpre.com/blog/?p=500。



