Json 如何添加请求id
我想以Json格式向服务器发送数据。 这是我的数据:Json 如何添加请求id,json,extjs,request,Json,Extjs,Request,我想以Json格式向服务器发送数据。 这是我的数据: var request = { bookId: grid.getBookId(), info: [] } store.each(function(rec, index, length) { request.info.push({ requestId: rec.get('???'), authorId: re
var request = {
bookId: grid.getBookId(),
info: []
}
store.each(function(rec, index, length) {
request.info.push({
requestId: rec.get('???'),
authorId: rec.get('authorId'),
price: rec.get('price')
});
});
我有bookId、authorId、price的数据,但从哪里可以获得requestId
我想得到图片上标记为红色的数字(Chrome浏览器中开发者工具中的网络)
我应该这样写requestId:rec.get('index')?但是这不起作用((不,只是普通的
requestId:index
)。
store.each(function(rec, index, length) {
// index argument contains number you are looking for
// for the current item
});