Нужно записать в переменные все значения обьекта:
{
"rows": [
{
"dayOff": true,
"dow": 0,
"dowAlias": "string",
"dowDescription": "string",
"lunch": true,
"lunchFinishTime": {
"hour": 0,
"minute": 0,
"nano": 0,
"second": 0
},
"lunchStartTime": {
"hour": 0,
"minute": 0,
"nano": 0,
"second": 0
},
"workFinishTime": {
"hour": 0,
"minute": 0,
"nano": 0,
"second": 0
},
"workStartTime": {
"hour": 0,
"minute": 0,
"nano": 0,
"second": 0
}
}
]
}
Получается достать все кроме
"hour": 0,
"minute": 0,
"nano": 0,
"second": 0
таким способом:
success: function (data) {
App.cashboxesList = [];
$.each(data.rows, function(key, value){
var currency = {
"dayOff": value.dayOff,
"dow": value.dow,
"dowAlias": value.dowAlias,
"dowDescription": value.dowDescription,
"lunch": value.lunch,
"lunchFinishTime_hour": value.lunchFinishTime['hour'],
"lunchFinishTime_minute": value.lunchFinishTime['minute'],
"lunchStartTime_minute": value.lunchStartTime['minute'],
"lunchStartTime_hour": value.lunchStartTime['hour']
};
console.log(currency);
App.cashboxesList.push(currency);
});
Render.pages.admin.cachboxesLimList();
},
Сильно не уверен по поводу правильности написания во этого:
"lunchFinishTime_hour": value.lunchFinishTime['hour'],
"lunchFinishTime_minute": value.lunchFinishTime['minute'],
"lunchStartTime_minute": value.lunchStartTime['minute'],
"lunchStartTime_hour": value.lunchStartTime['hour']