postman当中想用JSON提取器,但是有N个ID的值,请问我怎么提取出来。
这返回的是一个 json 数组数据, 每个id都是一个 json数组里的 json对象的一个属性
你应该是先取数组,再遍历数组取每个对象里的 id数据
var obj = [{"id":"123", "key":"test"}, {"id":"456", "key":"hello"}];
for (var i in obj)
console.log(obj[i].id);
21:26:24.991 [http-nio-8080-exec-7] WARN org.springframework.web.servlet.mvc.support.DefaultHandlerExceptionResolver - Resolved [org.springframework.http.converter.HttpMessageNotReadableException: JSON parse error: Cannot deserialize value of type `java.util.Date` from String "2020-12-12 12:02:56": not a valid representation (error: Failed to parse Date value '2020-12-12 12:02:56': Cannot parse date "2020-12-12 12:02:56": while it seems to fit format 'yyyy-MM-dd'T'HH:mm:ss.SSSX', parsing fails (leniency? null)); nested exception is com.fasterxml.jackson.databind.exc.InvalidFormatException: Cannot deserialize value of type `java.util.Date` from String "2020-12-12 12:02:56": not a valid representation (error: Failed to parse Date value '2020-12-12 12:02:56': Cannot parse date "2020-12-12 12:02:56": while it seems to fit format 'yyyy-MM-dd'T'HH:mm:ss.SSSX', parsing fails (leniency? null))
at [Source: (PushbackInputStream); line: 10, column: 13] (through reference chain: com.springboot.template.springbootwebrestfulcrud.entity.Employee["birth"])]