How to perform string conversion (array of objects):
[
{"id":1,"nome":"Maluf","cpf":"007.519.591-20"},
{"id":2,"nome":"Paulo Ricardo","cpf":"565.232.591-02"},
{"id":3,"nome":"Joaquim Barbosa","cpf":"007.519.699-32"},
{"id":4,"nome":"Dilma Folgada","cpf":"007.963.000-02"}
]
For an array of arrays:
[
[1,'Maluf','007.519.591-20'],
[2,'Paulo Ricardo','565.232.591-02'],
[3,'Joaquim Barbosa','007.519.699-32'],
[4,'Dilma Folgada','007.963.000-02']
]
Note: Note that in the expected result I do not have the attributes. id, name, cpf
Explaining the Situation:
I have a component Ext.data.ArrayStore
(EXTJS library component)
var dependentes = new Ext.data.ArrayStore({
fields: [
{name: 'id'},
{name: 'nomeDependente'},
{name: 'cpfDependente'}
]
});
And I have an array like this:
var dados = [
[1, Eduardo, '007.519.591-70'],
[2, 'Fabio', '222.519.111-70']
];
The array data is fixed, right? But I need to dynamically create the data from this array, because these will only come in the form of a string, I can not bring the data via the database, the tool that I work with limits me.