Format Widget enhancements as a JavaScript object literal

From dataZoa Wiki
Revision as of 09:01, 11 September 2018 by MCB (Talk | contribs) (Created page with "<div style="margin: 2em; margin-left: 6em;"> * Start with a { and end with a } * Wrap string values in quotes * Escape quotes within string values with a \ (e.g. \" or \') * E...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
  • Start with a { and end with a }
  • Wrap string values in quotes
  • Escape quotes within string values with a \ (e.g. \" or \')
  • Escape newlines within string values using an HTML <‍br‍>
  • Separate properties and sub-properties by commas
{
   strProperty: "string value",
   numProperty: 42,
   boolProperty: true,
   nullProperty: null,
   arrayProperty: [["one", 1], ["two", 2]],
   functionProperty: function(){ doStuff; },
   objectProperty: { subStrProperty: "line one <br> line two" }
}