Turns spreadsheet's rows of data into Javascript objects to make them easier to use.
Project Key: MTeYmpfWgqPbiBkVHnpgnM9kh30YExdAc
function camelStringExample(){
var aString = '1 This String ';
Logger.log(Objapp.camelString(aString));
}
More examples are available here:
ObjApp (version 1)First Release objectToArray(String[] headers, Object[] objValues)Changes an object like e.parameter into a 2D array useful in writting to a spreadsheet using the .setValues method Arguments:Name | Type | Description |
---|
headers | String[] | [header, header, ...] | objValues | Object[] | [{key:value, ...}, ...] |
Return Values:Type | Description |
---|
String[][] | [[value, value, ...], ...] |
rangeToObjects(String[][] range)Changes a range String[][] often returned from .getValues() into an Object[] with key value pairs. The first element in the String[][] is used to create keys Arguments:Name | Type | Description |
---|
range | String[][] | [[key, key, ...],[value, value, ...]] |
Return Values:Type | Description |
---|
Object[] | [{key:value, ...}, ...] |
splitRangesToObjects(String[] headers, String[][] values)Combines a String[] and String[][] into an Object[] with key value pairs Arguments:Name | Type | Description |
---|
headers | String[] | [key, key, ...] | values | String[][] | [[value, value, ...], ...] |
Return Values:Type | Description |
---|
Objec[] | [{key:value, ...}, ...] |
camelArray(String[] headers)Converts a String[] to camelCase, Example: "First Name" -> "firstName" Arguments:Name | Type | Description |
---|
headers | String[] | [string, string, ...] |
Return Values:Type | Description |
---|
String[] | [string, string, ...] |
camelString(String header)Converts a String to camelCase, Example: "First Name" -> "firstName" Arguments:Name | Type | Description |
---|
header | String | String |
Return Values:Type | Description |
---|
String | camelCase |
|
|