Coming Soon
...
hidden | true |
---|
Excerpt | ||
---|---|---|
| ||
jsonToItems (JSON, JSON Path, Lenient) Converts a block of JSON data into a recordset which contains the attributes for each node. |
...
Function: toXML()
Converts
...
an object or JSON string to XML.
Syntax
...
toXML(
...
input, root)
Argument | Type | Description |
---|---|---|
input | Object JSON String |
...
The object or JSON string to be converted to |
...
XML. |
...
root | String | The |
...
Defaults to “$” which matches the entire document. This must be passed in as a string i.e. encapsulated in quotes.
...
Lenient is a flag which determines whether to parse the JSON String leniently. Defaults to false
.
...
Examples
Record Set Returned
Code Block |
---|
jsonToItems('{"data":[{"value":"foo"},{"status":"bar"}]}', '$.data', true) |
Returns
Code Block |
---|
// returns a record set
{"value" : "foo"}, { "value" : "bar"} |
Array Returned
Code Block |
---|
jsonToItems('{"data":[{"value":"foo"},{"status":"bar"}]}', '$.data', true).value |
Returns
Code Block |
---|
// returns an array of values*
[foo, bar] |
...
name given to the root element. |
Example
Code Block | ||
---|---|---|
| ||
toXML(getCo, "CompaniesData") |
Returns
Code Block |
---|
<CompaniesData><CompaniesData><CompanyID>102</CompanyID><CompanyName>Lockman, Barrows and Kessler</CompanyName><Industry>Telecoms</Industry></CompaniesData><CompaniesData><CompanyID>103</CompanyID><CompanyName>Boyle, Bogan and Mohr</CompanyName><Industry>Telecoms</Industry></CompaniesData><CompaniesData><CompanyID>104</CompanyID><CompanyName>Kassulke LLC</CompanyName><Industry>Telecoms</Industry></CompaniesData></CompaniesData> |
Expand | |||||||
---|---|---|---|---|---|---|---|
| |||||||
|
See Also