Answer the question
In order to leave comments, you need to log in
How to create model from js data?
Given data
data = {
article: {
id: ['1', '2', '3', '4'],
description: ['blah1', 'blah2', 'blah3', 'blah4'],
date: ['1992', '1996', '1993', '1994'],
},
colors: {
id: ['1', '2', '3', '4'], //id article
attribute : ['eee,fff', 'ddd', 'eee,ppp,ooo', 'rrr,ddd,xxx,zzz'],
},
}
artcles [
{
id: 1,
description: 'blah1',
date: '1992',
color: [
'eee',
'fff'
]
}
{
id: 2,
description: 'blah2',
date: '1996',
color: [
'ddd',
]
}
]
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