Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have data that i want to group based on a field , and the other fields into arrays. exemple this table:
| Produit |
Brand |
| A |
Toyota |
| B |
Toyota |
| C |
Renault |
| D |
Toyota |
I want in the result a json file like that:
{
{Brand:"Toyota", Produit:["A","B","D"]},
{Brand:"Renault", Produit:["C"]}
}
Could some one help me please
Hello
{
{Brand:"Toyota", Produit:["A","B","D"]},
{Brand:"Renault", Produit:["C"]}
}
is not correct json . check on https://jsonlint.com/
it should be like this :
{ "Data" :
[
{Brand:"Toyota", Produit:["A","B","D"]}, {Brand:"Renault", Produit:["C"]}
]
}
Let me know your opinion.
you have 1st sort the input with Brand Name
then tWritetoJSON
Output
{"Brand":"Toyota","Product":["A","B","D"]}
{"Brand":"Renault","Product":["C"]}
i get just one element per table, this is the result obtained:
{
{Brand:"Renault", Produit:"C"},
{Brand:"Toyota", Produit:"A"},
{Brand:"Toyota", Produit:"B"},
{Brand:"Toyota", Produit:"D"}
}
Does not work
Hello
{
{Brand:"Toyota", Produit:["A","B","D"]},
{Brand:"Renault", Produit:["C"]}
}
is not correct json . check on https://jsonlint.com/
it should be like this :
{ "Data" :
[
{Brand:"Toyota", Produit:["A","B","D"]}, {Brand:"Renault", Produit:["C"]}
]
}
Let me know your opinion.