Answer the question
In order to leave comments, you need to log in
How to convert json structure for Ext.data.Model?
Hello! I started to study ExtJS and ran into a problem:
There is a json response of the form:
"users": {
"1": [
{
"id": 1,
"login": "user1",
"password": "12345",
}
],
"2": [
{
"id": 2,
"login": "user2",
"password": "123456",
}
]
}
Ext.define('User', {
extend: 'Ext.data.Model',
idProperty: 'id',
fields: [{
name: 'id,
type: 'int'
}, {
name: 'login',
type: 'string'
}, {
name: 'password',
type: 'string'
}]
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question