Pretty format json?

lock
push_pin
done
Besvarat
2

Is it possible to pretty format a json string: Map m = Map(data); printLine(m.toJson());

Outputs: { "First": "Martin", "Last": "Andersen"}

I would like to have it like this:

{
  "First": "Martin",
  "Last": "Andersen"
}
 
Regards Martin

10. juli 2026 | 10:54 fm

Allt Svar (2)

Not by default, but you can use the code shared by Sverre here: Simple JSON formatter in CRMScript

10. juli 2026 | 11:05 fm

OK, that is good! Thank you!

10. juli 2026 | 11:08 fm

Lägg till svar