PDA

View Full Version : how using this json structure in JsonStore



antop
7 Aug 2010, 3:09 AM
how setting 'fileds' config in JsonStore?

maybe can't?

{
"success": "true",
"total": "15",
"data": [
{
"seq": "61",
"name": "6767",
"tel": "6767-6767-6767",
"postzip": {
"seq": "",
"zipcode": "",
"sido": "",
"gugun": "",
"dong": "",
"bunji": ""
},
"address": "15",
"rank": {
"id": "D",
"rank": "????",
"discountRate": "0",
"saveRate": "5",
"peroid": "4"
},
"regDate": "2010-08-06",
"savedMoney": "0",
"arrears": "0",
"state": {
"id": "A",
"state": "??"
}
},
.... n
]
}

Condor
7 Aug 2010, 3:29 AM
Use:

{name: 'zipcode', mapping: 'postzip.zipcode'}
or, if the 'postzip' object is optional:

{name: 'zipcode', mapping: function(v){return v.zipcode ? v.zipcode.postzip : '';}}

antop
8 Aug 2010, 11:08 PM
thank you!!! very much!