Skip to main content

iI want to transform a json formatedJSON formatted output to another. How iI can do this  ?

Example: Old jsonJSON

"data": [ { "id" : "e49e183e-9325-4e62-8eda-7e63fb7cdbbd", "name" : "test" }, { "id" : "ac310894-d808-447b-a189-d07edb7f6dd7", "name" : "test2" } ] 

New JsonJSON which iI want without braces only like this with bracket

"aaData": [ [ "e49e183e-9325-4e62-8eda-7e63fb7cdbbd","test" ], [ "ac310894-d808-447b-a189-d07edb7f6dd7","test2" ] ] 

i want to transform a json formated output to another. How i can do this  ?

Example: Old json

"data": [ { "id" : "e49e183e-9325-4e62-8eda-7e63fb7cdbbd", "name" : "test" }, { "id" : "ac310894-d808-447b-a189-d07edb7f6dd7", "name" : "test2" } ] 

New Json which i want without braces only like this with bracket

"aaData": [ [ "e49e183e-9325-4e62-8eda-7e63fb7cdbbd","test" ], [ "ac310894-d808-447b-a189-d07edb7f6dd7","test2" ] ] 

I want to transform a JSON formatted output to another. How I can do this?

Example: Old JSON

"data": [ { "id" : "e49e183e-9325-4e62-8eda-7e63fb7cdbbd", "name" : "test" }, { "id" : "ac310894-d808-447b-a189-d07edb7f6dd7", "name" : "test2" } ] 

New JSON which I want without braces only like this with bracket

"aaData": [ [ "e49e183e-9325-4e62-8eda-7e63fb7cdbbd","test" ], [ "ac310894-d808-447b-a189-d07edb7f6dd7","test2" ] ] 
edited tags
Link
user663031
user663031
Source Link
Sascha Heim
  • 313
  • 1
  • 4
  • 15

Transform JSON Object to another - Format It

i want to transform a json formated output to another. How i can do this ?

Example: Old json

"data": [ { "id" : "e49e183e-9325-4e62-8eda-7e63fb7cdbbd", "name" : "test" }, { "id" : "ac310894-d808-447b-a189-d07edb7f6dd7", "name" : "test2" } ] 

New Json which i want without braces only like this with bracket

"aaData": [ [ "e49e183e-9325-4e62-8eda-7e63fb7cdbbd","test" ], [ "ac310894-d808-447b-a189-d07edb7f6dd7","test2" ] ]